Are the numbers a ranking? Then no, there is no algorithm for obtaining honest teams, because there is not enough information. Maybe even a coincidence
[1] & [2,3,4,5,6,7,8,9,10,11,12,13,14,15,16]
stacks up against a big team. This would be, for example, for chess teams if the difference between [1]
and [2]
was large.
Even the match that you called "unfair":
[1,2,3,4,13,14,15,16] & [5,6,7,8,9,10,11,12]
It may be fair in a game like baseball. In the end, players 13-16 still need to beat!
So, probably, the fairest thing would be to just select teams at random. It would also avoid any form of “game” in the system (like my friends, and I went to high school in high school :))