Merge sorted array