title: Adding to one element in array results in adding to all elements
body: <p>I have the following:</p>
  
  <pre><code>$p = New-Object PSObject -Property @{PIndex = New-Object System.Collections.ArrayList}
  [System.Collections.ArrayList]$pa = @($p) * 5
  </code></pre>
  
  <p>I want the array $pa (containing the $p object) to be of fixed size. So far all looks good. But when I add elements to PIndex of one member of array $pa, it adds the same elements to all the other members of $pa.
  So, I do this:</p>
  
  <pre><code>$pa[0].PIndex.Add(2)
  </code></pre>
  
  <p>Lets check:</p>
  
  <pre><code>PS C:\Users&gt; $pa[0].PIndex
  2
  PS C:\Users&gt; $pa[1].PIndex
  2
  PS C:\Users&gt; $pa[2].PIndex
  2
  </code></pre>
  
  <p>And so on. Just want to add elements to PIndex array of $pa[0]. Why is it also adding to the other members ? Am I missing a syntax ?</p>
  
  <p>Type looks fine:</p>
  
  <pre><code>PS C:\Users&gt; $pa.GetType()
  
  IsPublic IsSerial Name                                     BaseType                                                                            
  -------- -------- ----                                     --------                                                                            
  True     True     ArrayList                                System.Object                                                                       
  </code></pre>
  
  <p>Thanks..</p>