merge hash keys that are arrays into a single merged array