How to mapping an array to another array in efficient way : <p>For these 4 array, 
a1 a2 a3 </p>

<pre><code>a1 = [5,3,0,2,4,2,...,...]
a2 = [5,3,0,2,4,2,...,...] =&gt; store index number, correspond value is in b
a3 = [5,3,0,2,4,2,...,...]

b = [250,300,1,2,70,23,...,...] 
</code></pre>

<p>I want to find an efficient way to generate an array like:</p>

<pre><code> c1 = [23,2,250,1,70,1,...,...]
 c2 = [23,2,250,1,70,1,...,...]
 c3 = [23,2,250,1,70,1,...,...]
</code></pre>

<p>But using 3 Forloop solving this problem is too slow in my case.
I want to find an efficient way to solve.
For example, mapping 3 array at the same time.</p>
