title: Create a hash with multiple values from 2 arrays in powershell
body: <p>I want to create a hash with multiple values for each key, from 2 arrays A &amp; B which are unequal in size.</p>
  
  <pre><code>$A = @('usr1','usr2', 'usr3', 'usr4')
  $B = @('INC1','INC2','INC3','INC4','INC5','INC6')
  $h = [ordered]@{}
  for($i=0; $i -lt $B.Count; $i++)
  {
      for($j=0;$j -lt $A.Count; $j++)
      {
          $h[$A[$j]] += @($B[$j])
      }
  }
  </code></pre>
  
  <p>`
  Output I am getting</p>
  
  <pre><code>Name                           Value                                           
  ----                           -----                                           
  usr1                           {INC1, INC2, INC3, INC4...}                     
  usr2                           {INC1, INC2, INC3, INC4...}                     
  usr3                           {INC1, INC2, INC3, INC4...}                     
  usr4                           {INC1, INC2, INC3, INC4...} 
  </code></pre>
  
  <p>Desired Output:</p>
  
  <pre><code>Name                           Value                                           
  ----                           -----                                           
  usr1                           {INC1, INC5}                     
  usr2                           {INC2, INC6}                     
  usr3                           {INC3}           
  usr4                           {INC4}
  </code></pre>
  
  <p>I need to distribute the items from array B to Array A members in equal manner.
  That is, the elements of <code>$B</code> should be collected in hashtable entries named for the elements of <code>$A</code> one after the other, until no more <code>$B</code> items are left.</p>
  
  <p>What am I doing wrong in the above code?</p>