title: Can we map a array to another array in C, like mapping a file?
body: <p>I have an array (1D), and other array of same size in <strong>different</strong> order (which will change according to the program situation) should also have the same value.</p>
  
  <p>For example:</p>
  
  <pre><code>array1 = {1,2,3,4,5};
  </code></pre>
  
  <p>hence array2, should automatically have,</p>
  
  <pre><code>array2 = {4,2,3,1,5};
  </code></pre>
  
  <p>Some what you can say, i want to jumble up values according to my unique reference. But whenever parent array1 changes, array2 should also be updated at its respective indexes. Is it even possible? Array memory mapping? looping and saving to other array is taking time as this operation is iterated several times. I cannot do memcpy, because order can be different. Any pointers/helps/suggestions will be appreciated.</p>