Problem Storing and Comparing two Arrays

I am attempting to make a Hotel Safe. I want it to flash blue before a combination is entered and then become green once the combination has been set. I then want to be able to enter the correct code again to unlock it and flash green or if I enter the wrong code for the LED to flash red. Any help would be great, cheers!

int button[] = {2, 4, 6, 8};
int led[] = {3, 5, 7, 9};
int tones[] = {262, 330, 392, 494};
int buzzerPin = 10;
long startTime = 0;           
long timeLimit = 5000;
boolean safeCombo = false;
long updateTime = 0;
const long interval = 1000;
int enteredCode[4];
int guessCode[4];
const int redLED = 11;
const int greenLED = 12;
const int blueLED = 13;
int ledState = LOW;


void setup() {
  // put your setup code here, to run once:
  pinMode(button[0], INPUT_PULLUP);
  pinMode(button[1], INPUT_PULLUP);
  pinMode(button[2], INPUT_PULLUP);
  pinMode(button[3], INPUT_PULLUP);

  pinMode(led[0], OUTPUT);
  pinMode(led[1], OUTPUT);
  pinMode(led[2], OUTPUT);
  pinMode(led[3], OUTPUT);
  pinMode(redLED,OUTPUT);
  pinMode(greenLED,OUTPUT);
  pinMode(blueLED,OUTPUT);
  
  pinMode(buzzerPin, OUTPUT);
}


void loop() {
  // put your main code here, to run repeatedly:

if (safeCombo == false) {
  delay(1500);
  safeCombo = true;
}

for (int i = 0; i < 4; i++) {
  enteredCode[i] == buttonCheck();
  if (enteredCode[i] < 4) {
    flashLED(enteredCode[i]);
    delay(250);
    allLEDoff();
  }
}

if (enteredCode[0] == 4) {
  blinkLED(blueLED);
} else if (enteredCode[0] != 4){
  digitalWrite(blueLED,HIGH);
  } else if (enteredCode[3] != 4){
   digitalWrite(greenLED,HIGH);
    } 

guessSequence();
 
}










    //FUNCTIONS
    
//CHECK WHICH BUTTON IS PRESSED
int buttonCheck() {
  //check if any buttons are being pressed
  if (digitalRead(button[0]) == LOW) {
    return 0;
  } else if (digitalRead(button[1]) == LOW) {
    return 1;
  } else if (digitalRead(button[2]) == LOW) {
    return 2;
  } else if (digitalRead(button[3]) == LOW) {
    return 3;
  } else {
    return 4; //this will be the value for no button being pressed
  }
}


//FLASH LED
void flashLED (int ledNumber) {
  digitalWrite(led[ledNumber], HIGH);
  tone(buzzerPin, tones[ledNumber]);
}


//BLINKING LED FUNCTION
void blinkLED(int ledPin) { 
  unsigned long currentTime = millis();
if (currentTime - updateTime >= interval) {
  currentTime = updateTime;
  if(ledState == LOW){
    ledState = HIGH;
  } else {
    ledState = LOW;
  }
  digitalWrite(ledPin,ledState);
 }
}


//ALL LED OFF AND BUZZER
void allLEDoff () {
  //turn all the LEDs off
  digitalWrite(led[0], LOW);
  digitalWrite(led[1], LOW);
  digitalWrite(led[2], LOW);
  digitalWrite(led[3], LOW);
  //turn the buzzer off
  noTone(buzzerPin);
}


//COMPARE CODE
void compareCode() {
   if ((enteredCode[0] == guessCode[0]) && (enteredCode[1] == guessCode[1]) && (enteredCode[2] == guessCode[2]) && (enteredCode[3] == guessCode[3])) {
    blinkLED(greenLED);
    delay(3000);
    digitalWrite(greenLED,LOW);
    safeCombo = false;
  } else {
    blinkLED(redLED);
    delay(3000);
    digitalWrite(redLED,LOW);
    guessSequence();
  }
}


//GUESS SEQUENCE
void guessSequence() {
  for (int j = 0; j < 4; j++) {
    guessCode[j] == buttonCheck();
    if (guessCode[j] < 4) {
      flashLED(guessCode[j]);
      delay(250);
      allLEDoff();
    }
  }
  compareCode();
}

Help with what part, exactly?