registration: Improve merging of arrays