A rather elegant implementation of ARRAY_MAP. Folds and DICT variants to come.