I think this is the way to go without using any arrays :
// The number of images
int nbImages = 50;
// Go through every image
for (int i=0; i<nbImages; i++) {
// Load it (assuming that their names are image###.png)
String filename = "image" + i + ".png";
PImage img = loadImage(filename);
// Loop through every pixels
img.loadPixels();
for (int x = 0; x < img.width; x++) {
for (int y = 0; y<img.height; y++) {
int loc = x + y * img.width;
// Do something with the pixel
img.pixels[loc] = ...;
}
}
img.updatePixels();
// Override the image
img.save(filename);
}