Creating a pattern array for a Single LED

hey there, fellow arduino noob here, I have sucessfully written code for the project i'm working on, and am now going back through trying to figure out how to optimize it.
The goal: have one RGB led flash in a series of patterns, which can be changed with the push of a button, which will be later read via photocell to create interesting beats.
Here is what I have so far. In the end I want the patterns to be much more complex, but for now this just demonstrates that it works. The button interrupt could use some tweaking...

const int Rpin = 10;
const int Gpin = 9;
const int Bpin = 8;
const int debugLED = 13;

int patternmode = 0;  //different modes for patterns.  starts at 0

volatile int state = LOW;   

void setup(){
  
  pinMode(Rpin,OUTPUT);
  pinMode(Gpin,OUTPUT);
  pinMode(Bpin,OUTPUT); 
  pinMode(debugLED,OUTPUT);
  attachInterrupt(0,checkButton,RISING);   // (0 = pin 2)
 
  
}

void loop(){
  
  switch (patternmode) {
    
   case 0:
     patternFlick();
       break;
       
   case 1:
    patternBlink();
       break;
    
    case 2:
     patternPulse();
        break;
    
    
  }
 
}

void checkButton(){   //This controls the LED and checks the button and sends back a value for the cases
  

    digitalWrite(debugLED, HIGH);    // make Led turn on when button is pressed
    
patternmode = (patternmode + 1) % 3;   //INCREMENT COUNTER. is the % 3 even necessary?
  delay(2500);  // 1/2 second
  digitalWrite(debugLED, LOW);
  
  }


void patternFlick() {
 
  
  digitalWrite(Rpin,HIGH);
  digitalWrite(Gpin,LOW);
  digitalWrite(Bpin,LOW);
  delay(50);
  digitalWrite(Rpin,LOW);
  digitalWrite(Gpin,HIGH);
  digitalWrite(Bpin,LOW);
  delay(50);
  digitalWrite(Rpin,LOW);
  digitalWrite(Gpin,LOW);
  digitalWrite(Bpin,HIGH);
  delay(50);

  
  
}

void patternBlink(){
  

    
  digitalWrite(Rpin,HIGH);
  digitalWrite(Gpin,HIGH);
  digitalWrite(Bpin,LOW);
  delay(50);
  digitalWrite(Rpin,LOW);
  digitalWrite(Gpin,HIGH);
  digitalWrite(Bpin,HIGH);
  delay(50);
  digitalWrite(Rpin,HIGH);
  digitalWrite(Gpin,LOW);
  digitalWrite(Bpin,HIGH);
  delay(50);

}

void patternPulse(){
  

  
  digitalWrite(Rpin,HIGH);
  digitalWrite(Gpin,HIGH);
  digitalWrite(Bpin,HIGH);
  delay(500);
  digitalWrite(Rpin,LOW);
  digitalWrite(Gpin,HIGH);
  digitalWrite(Bpin,LOW);
  delay(500);
  digitalWrite(Rpin,HIGH);
  digitalWrite(Gpin,LOW);
  digitalWrite(Bpin,HIGH);
  delay(500);

}

I want to get away from using the delays so that it doesn't slow down the code.
I have found tutorials that show you how to use arrays to control patterns across multiple LED's, but I haven't found any information for delivering a string of 0's and 1's to a single LED. Have any advice on where to look?

The button interrupt could use some tweaking...

No, the button interrupt needs a complete overhaul.

void checkButton(){   //This controls the LED and checks the button and sends back a value for the cases
    digitalWrite(debugLED, HIGH);    // make Led turn on when button is pressed
    patternmode = (patternmode + 1) % 3;   //INCREMENT COUNTER. is the % 3 even necessary?
  delay(2500);  // 1/2 second
  digitalWrite(debugLED, LOW);
  }

Interrupt service routines are supposed to be fast. Really fast. As in lightning fast. A 2 and half second delay has ABSOLUTELY NO PLACE in an ISR.

Even if you could call delay() in an ISR...

All that the interrupt will do, anyway, is change the value of patternmode. The currently running pattern, with all it's delays, will complete before you notice that patternmode has changed.

Therefore, your interrupt routine is a waste of time and effort. Simply poll the switch on every pass through loop.

If you want to spend your effort developing complex code, look at state machines, and get rid of all those delays(). The blink without delay example is a good place to start.

Look at how people scroll things on led matrixes, same thing except n^2 times more leds

PaulS:
All that the interrupt will do, anyway, is change the value of patternmode.

Yes, i need to slow down the delay in the buttonCheck. the only reason why it was there was for the indicator LED on pin 13, which i was just using to test the code out. I honestly don't need the indicator LED to light up at all once the code is finalized, so that can go away completely.
The purpose of the interrupt was to change the value of patternmode, which toggles between the cases for the LED patterns, so, other than the delay that i forgot to slow down/take out, I'm not sure why it is an issue, since it seems to be functioning ok.
The thing I wasn't sure about with the interrupt, which is why I said it may need tweaking, had to do with the RISING/FALLING/CHANGE etc. terms, which i don't fully understand how the two work with each other yet, since it is mentioned twice within the code provided on the arduino.cc tutorial.
once the LED patterns are fully written out, they will probably be about 4-6 times as long as they are now.

Here's the code i had before I discovered interrupts. This code calls the checkButton every time a delay occurs. I was having issues of it not detecting the button being pressed, and I was interested in learning to use the arrays, so i had changed it, but maybe this is actually better...

const int Rpin = 10;
const int Gpin = 9;
const int Bpin = 8;
const int buttonPin = 2;
const int debugLED = 13;

//int del = delay;

int patternmode = 0;  //different modes for patterns.  starts at 0
const int buttonState = digitalRead(buttonPin);

void setup(){
  
  pinMode(Rpin,OUTPUT);
  pinMode(Gpin,OUTPUT);
  pinMode(Bpin,OUTPUT);
  pinMode(buttonPin,INPUT);
  pinMode(debugLED,OUTPUT);
 
  
}

void loop(){
  
  switch (patternmode) {
    
   case 0:
     patternFlick();
       break;
       
   case 1:
    patternBlink();
       break;
    
    case 2:
     patternPulse();
        break;
        
    //case 3:
     // patternFade();
       //   break;    
    
    
  }
//  checkButton(); 
}

void checkButton(int del){   //This controls the LED and checks the button and sends back a value for the cases
  
  int buttonState = digitalRead(buttonPin);

  
  if (buttonState == LOW) {
    digitalWrite(debugLED, HIGH);    // make Led turn on when button is pressed
    
patternmode = (patternmode + 1)% 3;   //INCREMENT COUNTER. is the % 3 even necessary?
 
  digitalWrite(debugLED, LOW);
  
  }
   delay(del);  
}

void patternFlick() {
 
  
  digitalWrite(Rpin,HIGH);
  digitalWrite(Gpin,LOW);
  digitalWrite(Bpin,LOW);
  checkButton(500);
  digitalWrite(Rpin,LOW);
  digitalWrite(Gpin,HIGH);
  digitalWrite(Bpin,LOW);
  checkButton(500);
  digitalWrite(Rpin,LOW);
  digitalWrite(Gpin,LOW);
  digitalWrite(Bpin,HIGH);
  checkButton(500);

  
  
}

void patternBlink(){
  

  digitalWrite(Rpin,HIGH);
  digitalWrite(Gpin,HIGH);
  digitalWrite(Bpin,LOW);
  checkButton(1000);
  digitalWrite(Rpin,LOW);
  digitalWrite(Gpin,HIGH);
  digitalWrite(Bpin,HIGH);
  checkButton(1000);
  digitalWrite(Rpin,HIGH);
  digitalWrite(Gpin,LOW);
  digitalWrite(Bpin,HIGH);
  checkButton(1000);  
  digitalWrite(Rpin,HIGH);
  digitalWrite(Gpin,HIGH);
  digitalWrite(Bpin,HIGH);
  checkButton(1000);
  digitalWrite(Rpin,LOW);
  digitalWrite(Gpin,HIGH);
  digitalWrite(Bpin,HIGH);
  checkButton(1000);
  digitalWrite(Rpin,HIGH);
  digitalWrite(Gpin,LOW);
  digitalWrite(Bpin,HIGH);
  checkButton(1000);
  

}

void patternPulse(){
  

  
  digitalWrite(Rpin,HIGH);
  digitalWrite(Gpin,HIGH);
  digitalWrite(Bpin,HIGH);
  checkButton(50);
  digitalWrite(Rpin,LOW);
  digitalWrite(Gpin,HIGH);
  digitalWrite(Bpin,LOW);
  checkButton(50);
  digitalWrite(Rpin,HIGH);
  digitalWrite(Gpin,LOW);
  digitalWrite(Bpin,HIGH);
  checkButton(50);
   digitalWrite(Rpin,HIGH);
  digitalWrite(Gpin,LOW);
  digitalWrite(Bpin,LOW);
  checkButton(50);
  digitalWrite(Rpin,LOW);
  digitalWrite(Gpin,HIGH);
  digitalWrite(Bpin,LOW);
  checkButton(50);
  digitalWrite(Rpin,LOW);
  digitalWrite(Gpin,LOW);
  digitalWrite(Bpin,HIGH);
  checkButton(50);

}

Thank you for your insight

with the code mentioned above, since there is no delay written in between the debugLED turning on and off, it doesn't need to be there at all, since the LED can barely be detected that it was being turned on in the first place.

void checkButton(int del){   //This controls the LED and checks the button and sends back a value for the cases
    int buttonState = digitalRead(buttonPin);
  if (buttonState == LOW) {
    digitalWrite(debugLED, HIGH);    // make Led turn on when button is pressed
    patternmode = (patternmode + 1)% 3;   //INCREMENT COUNTER. is the % 3 even necessary?
   digitalWrite(debugLED, LOW);
    }
   delay(del);  
}

Let's get this straight, now. YOU CAN"T USE DELAY IN AN ISR!