title: Create a team generator with a given number of teams
body: <p>I would like to take an array of <code>[String]</code> and split it up into a given number of groups.</p>
  <p>I have tried using this extension</p>
  <pre><code>extension Array {
      func chunked(into size: Int) -&gt; [[Element]] {
          return stride(from: 0, to:count, by: size).map {
              Array(self[$0 ..&lt; Swift.min($0 + size, count)])
          }
      }
  }
  </code></pre>
  <p>to split the array into a given number of elements per subarray, which for that function it works.
  But to split it into a desired number of subarrays, I tried dividing the <code>array.count</code> by the desired number of teams, which works but only in certain circumstances.
  If there are any extra elements, it puts them into an extra subarray at the end, and the number needs to come out even if I want this to work perfectly, which is the minority of the time.
  So I guess this <code>array.chunked</code> function is not the solution in any way.</p>
  <p>Maybe there is a way to do it with a for loop by taking an <code>array.randomElement()</code>, adding that to a variable (which would be a team) and then removing that element from the original array, and iterating over it until the original array is empty. And end up with an array of subarrays which would be the teams, or just separate variables which would be the teams. It could be any of those options.</p>
  <p>Any ideas on how to do this?</p>