Add Player to Team (Multiplayer)?

Hello,

I would like to seperate the players in my lobby into two groups.
By clicking a button, the players can choose themselves, which group they want to join.

I thought about using PC-Arrays?
Anyone, who knows a way?

Cheers,