Storing data in a map-like instruction with a pair for the key

Hi! I have trained resnet model and I’ve assigned a single integer to each of my neurons. I want to sort and find 5 of most valuable and least valuable neurons based on that single integer. How should I store my data so I can sort and have the layer and id of those neuron + that integer value?