add merging method to ArrayUtil