heap: better map hierarchy for arrays