Issues with 8 ralays module on the ardunino Uno

Hi everybody!
I’m new to the Forum, i recentely got an arduino uno with a 8 relays module, i was thinking of a program.
I want that the every single one ralay get on and off independently one of the other.
For example, I need to activate n1 relay for a n amount of time but at the same time i want to activate the n 2 with a different amount of time without modify the code.
In short words i want an universal program that works independently.
Pls give me some help…

Use millis() for timing and put the variable in arrays.
An example of 2 LEDs blinking at different rates

unsigned long startTimes[] = {0, 0};
unsigned long periods[] = {1001, 1005};    //examples
const byte ledPins[] = {10, 11};
const int numberOfLeds = sizeof(ledPins) / sizeof(ledPins[0]);

void setup()
{
  Serial.begin(115200);
  Serial.print("Number of LEDs : ");
  Serial.println(numberOfLeds);
  for (int pin = 0; pin < numberOfLeds; pin++)
  {
    pinMode(ledPins[pin], OUTPUT);
  }
}

void loop()
{
  unsigned long currentTime = millis();
  for (int led = 0; led < numberOfLeds; led++)
  {
    if (currentTime - startTimes[led] > periods[led])
    {
      digitalWrite(ledPins[led], !digitalRead(ledPins[led]));
      startTimes[led] = startTimes[led] + periods[led];
    }
  }
}

Easily expanded to any (reasonable) number of outputs.