add type information to pmap
fix array method

hadn't been updated for the index-based keys