Grouping of list

Hi, I have 2 lists and I want to group my coordinates according to those that have the same Z-coordinates and at the same time retain/map the information of the other list. How do I go about doing it? Mapping