I guess you could write a conversion function that would convert new higher digital pin numbers and mimic what the arduino digitalwrite() and digitalread() functions due. You could call them extendedwrite() and extendedread()
Anyway below is a write up from the Arduino site on how direct port access works to give you an idea of what is involved. I’m more of a hardware guy then software so I can’t just whip you out the functions
It would be a pretty unusual application that would require the extra I/O pins I suspect, but it’s nice to know they are available. I decided not to solder header connectors to those extra pins at this time.
arduino.cc/en/Reference/PortManipulation
Lefty