title: How do I **write** to ArraySegment<byte>.Array? Should I use unsafe code?
body: <p>There are many questions that ask how to get a subset of an array on this site, however no one has successfully gotten an answer on how to write to the array as if it were <code>byte[]</code>.</p>
  
  <pre><code>byte[] bigTargetBytes = new byte[10000];
  
  byte[] twentyBytes = sha256.ComputeHash(sourcebytes);  // size is 20 bytes, 
  // how do I append this to the existing array without copying, using Linq, etc?
  </code></pre>
  
  <p>What I don't want to do is have two arrays and do a copy between them, since that is time intensive proportional to the length of the array (and my arrays are long)</p>