Two dimensional array merge