MKRZERO how to use addtional IO

I'm duplicating much of the MKRZERO schematic on my own custom board. I want to be able to select the MKRZERO board from the board list in the Arduino IDE so that I don't have to make my own board file (I don't even know how to do that). On the MKRZERO headers, there are only 8 digital IO pins D0 thru D7. I noticed on the schematic that there are a couple of unused microcontroller pins that are tied to test points. My project happens to need more than just the 8 dio pins given on the headers. How do I access unused pins on the SAMD21G processor via the Arduino IDE?

Also, I posted this in another topic but got no responses: how do I determine the mapping for pin numbering in Arduino to pin numbering on the microcontroller? For example, to use SPI I have to define the clock as pin 12 (as labelled on the MKRZERO header), but this is actually port A bit 17, which is microcontroller pin 26. I assume there's some header file or something that maps the micro pins to the header pins, but where can I find that? I feel like that information would lend itself to the question above about accessing unused pins on the micro.

you have answers in your previous thread

and see this samd21g - Adding a custom board to the Arduino IDE - Arduino Stack Exchange

You can look at the source code for digitalRead() and digitalWrite() in 'wiring_digital.c'. The mappings from Arduino pin number to hardware are defined in 'port.h' and 'variant.cpp'. The trick here is finding the correct version of these files for the particular processor. That's were using an IDE like Eclipse / Sloeber really helps. It allows you to trace functions and variables to the files that contain their definitions.

And, of course, the processor datasheet has all the required register maps, etc.