I didn't take the time to put your random ranges into an array (I couldn't figure it out actually) but you could consider simplifying your code using the (suggested) array...
byte ledPin[6] = {2,3,4,5,6,7};
unsigned long lastMillis[6] = {0};
unsigned long ledDelay[6] = {0};
void setup()
{
randomSeed(analogRead(A0));
for(int i = 0; i < sizeof(ledPin)/sizeof(ledPin[0]); i++)
{
pinMode(ledPin[i], OUTPUT);
digitalWrite(ledPin[i], random(2));
ledDelay[i] = random(2500);
}
}
void loop()
{
for(int i = 0; i < sizeof(ledPin)/sizeof(ledPin[0]); i++)
{
if(millis() - lastMillis[i] > ledDelay[i])
{
digitalWrite(ledPin[i], !digitalRead(ledPin[i])); //edit added the not
lastMillis[i] = millis();
ledDelay[i] = random(2500);
}
}
}
compiles but not tested