Urgent: Why doesn't the timing stay consistent?

Hello. I'm working on a display for a school performance this weekend. I thought this would be a very simple project. It's 5 LEDs that flicker.

The effect itself is perfect at first, but after a short while the LEDs stop changing. It freezes in this state for a minute, and then the effect starts playing at a much faster rate. After this point, it flips back and forth between freezing and flickering quickly each minute or so.

The code is attached. Why is the execution speed changing so much?

I'd really love to have the project working for the performance in a couple days, so all help is greatly appreciated.

const int ledPin[] = {3, 5, 6, 9, 10}; // all PWM pins
int ledState[5];
long randNumber;
int flickerTime = 0;
const int flickerDelay = 0;

void setup() {
  for (int i=0; i<=4; i++) {
    pinMode(ledPin[i], OUTPUT);
  }
  randomSeed(analogRead(0)); // seed via unconnected pin noise
}

void loop() {
    if (flickerTime < millis()) {
      for (int i=0; i<=4; i++) {
        if (ledState[i] == 0) { // if off, maybe flip back on
          randNumber = random(0, 255);
          if (randNumber == 1) {
            ledState[i] = 250;
          }
        } else {
          ledState[i]--; // fade out
        }
  
        if (i == 2) {
          ledState[i] = 255; // don't flicker center light
        }
        analogWrite(ledPin[i], ledState[i]);
      }
    }
    flickerTime = millis() + flickerDelay; // adjust timing
}

Well, int flickerTime = 0; should be unsigned long flickerTime = 0;
pinMode(ledPin, OUTPUT); Hummm
const int flickerDelay = 0;
. . .
flickerTime = millis() + flickerDelay; Since flickerDelay is always 0, what are you trying to do here?

Likely multiple issues,
First one I see is you define a array called ledpin[], but all the rest of your code uses undefined variable called ledpin.
Example

void setup() {
  for (int i=0; i<=4; i++) {
    pinMode(ledPin, OUTPUT);
  }

What is the difference for pinMode when i is 1 vs when i is 5

The OP meant ledpin

[i].

Because they ignored the admonition in the instructions to use [code] tags, the [i]

was interpreted as "make the subsequent text italic."

Phrasing the answer as a clever test question will just confuse them.

ps, risen, this isn't urgent for us.

larryd:
Well, int flickerTime = 0; should be unsigned long flickerTime = 0;

That was the one. Thanks so much!!

int flickerTime = 0;
void loop() {
    if (flickerTime < millis()) {

Since the 'int' can only hold numbers up to 32767, after running 32.767 seconds, this will never be true. Change the type to 'unsigned long int' and it will run for over 40 days.
(If the 'int' gets promoted to 'unsigned int' as part of the comparison it will run for 65.535 seconds before freezing.)