Mon Aug 13, 2018 8:44 am
The origin of your confusion is basically historical
Deep in the dark and distant past, the designers of the first Pi were trying to make things simple for a first-time user.
So they arranged for several busses to be broken out to a 26-way connector - an I2C bus, an SPI bus, and a UART - and, because there were extra pins available, also brought out seven more general-purpose signals and named them GEN0 to GEN6. Nice and straight forward, with the internal translation hidden from the user.
But they also produced a schematic for the Pi, which revealed that all those busses and those seven signals came from a 32-way interface, and they each had a number from 0 to 31, unrelated to what they were called.
What's more, everyone asked "Please sir, may I have More?"
So they got More - 11 more, on a larger 40-way connector.
Two of them are still "hidden" - pins 27 & 28 (GPIO0 & GPIO1, configured as an I2C bus using ALT 0) are called ID_SD and ID_SC, and it's Forbidden To Use Them For Anything.
But the underlying numbering is still available, and all of GPIO0 to GPIO27 can be used however you like (28 to 31 aren't broken out, and there's another bank, GPIOs 32 to 53, that carry things like SD card access. There's also a GPIO expander that allows even more wierd things to happen)
Most of them have built-in alternative functions, ALT 0 to ALT 5, which is how they created those original busses. But they're still just general-purpose IO at heart.