Do you need to form pairs from a list of team members? Take inspiration from this demo app that utilizes a JointJS+ StackLayout to map team members together in pairs with an identifier label - randomly create pairs with the ability to manually change the order (using the drag and drop feature).
Shuffle the order of the teams, or manually change them by dragging and dropping team members into different positions.
The source code of this demo is available as part of the JointJS+ commercial license. Don't have a license yet? Start a trial and use the source code of this and many other demos for free, with no obligations, for 30 days.