“A pixel is a point sample. It exists only at a point. For a color picture, a pixel might actually contain three samples, one for each primary color contributing to the picture at the sampling point. We can still think of this as a point sample of a color. But we cannot think of a pixel as a square—or anything other than a point. There are cases where the contributions to a pixel can be modeled, in a low-order way, by a little square, but not ever the pixel itself.”
If you accept that a pixel can be considered a point source, then it’s suddenly not so hard to think of some pixels occupying a three-dimensional array.
“A pixel is thought of as the smallest single component of an image. The definition is highly context sensitive; for example, we can speak of printed pixels in a page, or pixels carried by electronic signals, or represented by digital values, or pixels on a display device, or pixels in a digital camera (photosensor elements). This list is not exhaustive, and depending on context there are several terms that are synonymous in particular contexts”