It depends on the species. I have had two Lysiosquillina maculata together for 5 years, but they are a male and female pair and this species is monogamous. Most non-monogamous species should not be kept in the same tank with a few exceptions. If you have some LR or rubble that has several cavities of different sizes, it is possible that a small individual can survive in a small cavity that a larger one cannot enter.
Roy