Why is the pixels array "unidimensional" and not bidimensional?

I’m not using processing or p5.

you posted under
/ processing / beginners /
but used the “p5” word , now your last comment even confuses me more.

what is your working environment?