My pseudo-code looks like this inspired from this thread https://www.avrfreaks.net/forum/how-can-i-make-array-ports , obviously I need help to correct.
volatile uint8_t *a[] = { &PINB0, &PINB1 };
I intent to read the pins one by one using a loop and assign its value to a variable.