There are 3 arrays in pins_arduino.h
The order of the pins in the array is the order of mapping to
One array has just ports listed - so may see a bunch of Bs, then Cs, then Ds
One array assigns the bits within that port - so you may see 0,1,2,3,4,5,6,7,0,1,2,3,4,5,6,0,1,2,3,4,5,6
thus D0 would be PortB-bit0, D1 would be PortB-bit1, etc, up thru D19 being PortD-bit6 in this made up example.
Not all bits on all ports may exist.
The final array tells the code whether the pin has timer capability
"Not a timer" I think it has entries somewhat like that.
Most of the schematics, and the datasheet, show the Port-bit next to the physical pin.