Not sure what I've done wrong...

I'm not going to debug the sketch, don't have the energy but I do notice that in loop()

  for(byte x = MIN; x < imageWidth; x++) {
    for(byte y = MIN; y < imageHeight; y++) {
      byte neighbourCount = 0;
      
      if(values[x - 1][y]) {
        neighbourCount++;
      }
      if(values[x][y - 1]) {
        neighbourCount++;
      }
      if(values[x - 1][y - 1]) {
        neighbourCount++;
      }

you don't check edge conditions.

When x == MIN you still look for neighbors with an x - 1 coordinate.