Merging arrays within arrays