Variety is good, in general. Play mostly with people around our level, because a competitive match is where your shots are really tested. Play some weaker players too, just so you have the chance to practice some strokes with little pressure.
Beyond that, it depends a bit on your weaknesses. My problem is being too passive, so playing with stronger players too much of the time is not great, because it reinforces my tendencies to just play solidly, both because I can rely on a strong partner to finish points, and because my smashes have to be too good to be worth going for that often. On the other hand, it's always nice to play with a strong partner because you just get more balls, which is ultimately the most important thing for practicing.