Corrected behavior of mapValues for arrays (always returns an object)