Implement mergearr to sort two sorted arrays.