Most boards have some extra AUX pins that can be used for stuff like controlling servos, relays what ever. Also pins normally used for display and sd-card reader can be used for different things, you just need to change their function in Marlin. I don't know if some Arduino pins are left unused with those boards, never had that in depth look at the datasheets...
I think Prusa is using some unused limit switch pins to read fan speed in MK2.5 upgrade for example.