Disentangling the feedback loops driving spatial patterning in microbial communities