Simplify array merge algorithm

* When ary1 or ary2 is empty, it means that all elements left in ONE
array are bigger than the elements in merged_arys, which can be simply
concatenated into it (one of the arrays will be always empty, so order
does not matter)