Response that I provided last night regarding this issue. I hope it helps!
"I was stumped over this for the longest time. The best solution that I was able to come up with was to create the teams as stated in the Complete Reference Guide for Lobby Game Modes (Thanks ubdead! Your tutorial was a lot of help.) and then create a trigger that sets player 1 to PlayerGroup A. Afterwards, you can run conditions that check whether or not player 2/3/4/5... are mutually allied or mutually enemies towards one another. For instance, if you have Player 1 and Player 2 both on the top and Player 3 on the bottom team, it would recognize that players 1 and 2 were allies and assign them to PlayerGroup A. Player 3 would then be placed on PlayerGroup B after seeing that they are enemies.
This does cause a problem although for all pratical uses it is minimum: PlayerGroup A can be either the top team or bottom team in the Lobby as Player 1 is always assigned to PlayerGroup A regardless of what team he/she is in the lobby.
I hope that this helps everyone in the community that has been having issues with this and perhaps it will allow us to come up with a more efficient way of handling this problem as well."