merge two sorted arrays into new ordered array