[WIP] #6965 - non-recursive `ArrayUtils::merge()` implementation

See #6965

This is just an experiment, and I didn't benchmark it.