32 bit binary counter

Damn there is!

const byte LedPins[] = {3, 4, 5, 6, 7};
const byte NrLeds = sizeof(LedPins);
const unsigned int MaxCount = (1 << NrLeds) - 1;

const unsigned int Interval = 400;

unsigned long lastMillis;
unsigned int currentCount;

void setup(){
  for(byte i = 0; i < NrLeds; i++){
    pinMode(LedPins[i], OUTPUT);
  }
}

void loop(){
  if(millis() - lastMillis >= Interval){
    lastMillis = millis();
    
    if(currentCount < MaxCount){
      currentCount++;
    }
    else{
      currentCount = 0;
    }
    
    for(byte i = 0; i < NrLeds; i++){
      digitalWrite(LedPins[i], bitRead(currentCount, i));
    }
  }
}

Non blocking and you can scale it up to 16-bit without a problem, just define more pins in LedPins.