Array: How to insert in right index order?

Quick question:
I have 2 arrays and I want to create the third one as associative array.

ex: tab1 contains IDtab1 (10,5,6,…) tab2 contains IDtab2 (12,12,12,5,5,6,10,10…)

tab3 contains both IDtab1 and IDtab2 (associative array)

However I want to able to insert into the right INDEX area only.

Something Like: tab3 -> IDtab1(10,5,6) IDtab2(10,10,5,5,5,6)
In the right order

How can i do that??