Need help/advice in 2x16 LCD menu

I have problem making an iterative lcd menu for my board contains of few sensor, 4 buttons, and a a lcd.

button 1 - for changing mode (this is easy)
button2-3 - for moving an arrow to change different values, such as setting time and alarm. (also this 2 buttons can be used to change values.)
button4 - is the okay/select button

the problem of my program is, I have no idea how to make it work. It’s easy to change from one screen to one screen, but I have no idea how to achieve the functions mentioned above.

any tips, advices?

Mode 1 - mode4

subMode - sub menu for mode 1, for setting time and alarm, and change temp reading from F/C

Full code

#include <LiquidCrystal.h>

LiquidCrystal lcd(2,3,4,5,6,7);

byte timeIcon[8] = {
	0b11111,
	0b10001,
	0b01010,
	0b00100,
	0b00100,
	0b01010,
	0b10001,
	0b11111};

byte tempIcon[8] = {
        0b00100,
	0b01011,
	0b01010,
	0b01011,
	0b01110,
	0b11111,
	0b11111,
	0b01110};

byte batteryIcon[8] = {
	0b01110,
	0b11011,
	0b10001,
	0b11111,
	0b10001,
	0b11111,
	0b11111,
	0b11111};

byte lightIcon[8] = {
        0b00100,
	0b10101,
	0b01110,
	0b11011,
	0b01110,
	0b10101,
	0b00100,
	0b00000};

byte arrowupIcon[8] = {
	0b00100,
	0b00100,
	0b01110,
	0b11111,
	0b00100,
	0b01110,
	0b01110,
	0b01010};

byte buttonIcon[8] = {
	0b00000,
	0b00000,
	0b00000,
	0b11111,
	0b10001,
	0b10101,
	0b10001,
	0b11111};

byte alarmIcon[8] = {
        0b00000,
	0b00100,
	0b01110,
	0b01110,
	0b01110,
	0b11111,
	0b00100,
	0b00000
};

int timeI=0;
int tempI=1;
int batteryI=2;   
int lightI=3; 
int arrowupI=4;   
int buttonI=5;  
int alarmI=6;  


#define tempI char(0x01)
#define batteryI char(0x02)   
#define lightI char(0x03) 
#define arrowupI char(0x04)   
#define buttonI char(0x05)
#define alarmI char(0x06)
#define timeI char(0x07)
//====================================================================================================================================
//====================================================================================================================================

// Pinouts =====>
int buttonPin[6]={0,A4,A3,A2,A1}; // Button 1-4
int ledPin[7]={0,8,9,10,11,12};   // Led 1-5
int shuntPin=A5;               
int tempPin=A6; 
int lightPin=A7;
int beeperPin=A0;


// TimeValues  ======>
int DAY=0; //Day
int HR=0; //hour
int MIN=0; //minute
int SEC=0; //Second
int lastSec=0;
unsigned long previousSec=0;

int bdHR=0; // hour --- timer for battery discharge mode
int bdMIN=0; //minute
int bdSEC=0; //Second

int cdDAY=0; // days --- countdown timer for battery discharge mode
int cdHR=0; // hour
int cdMIN=0; //minute
int cdSEC=0; //Second

//   ======> sensorValues
int shuntMa=0;
int shuntMah=0;
unsigned long shuntMatotal=0;
int tempF=0;
int tempC=0;
int lightLevel=0;

//   ======> menus
int mode=1;
int lastMode=1;
int subMode=0;
int subsubMode=0;
int arrowLoc[16]={1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};

//   ======> button
int buttonState[5]={0,0,0,0,0};
int lastButtonState[5]={0,1,1,1,1};
int buttonPress[5]={0,0,0,0,0};
int lastButtonPress[5]={0,0,0,0,0};
//   ======>


//====================================================================================================================================
//====================================================================================================================================

the rest of the code

void setup() {
  
  //===5 RED LEDs ===
for(int x=1; x<7; x++){
  pinMode(ledPin[x],OUTPUT);
}  
  //===4 Black buttons ===  
for(int x=1; x<5; x++){
  pinMode(buttonPin[x], INPUT_PULLUP);
}  
  //===Sensors ===
  pinMode(shuntPin, INPUT);// shunt voltage   
  pinMode(tempPin, INPUT);// Temp. Sensor  
  pinMode(lightPin, INPUT);// Light resistor   
  pinMode(beeperPin, OUTPUT); // Beeper  
  
  //===LCD SETUP ===  
  lcd.begin(16,2);
  lcd.createChar(7, timeIcon);
  lcd.createChar(1, tempIcon);
  lcd.createChar(2, batteryIcon);   
  lcd.createChar(3, lightIcon);  
  lcd.createChar(4, arrowupIcon);   
  lcd.createChar(5, buttonIcon);  
  lcd.createChar(6, alarmIcon);  
  
}

//====================================================================================================================================
//====================================================================================================================================
void loop() {

   
  
//------------------------------------------------------------------>>LCD 
if(mode!=lastMode){
  lastMode=mode;  
  if(subMode>=1){
  subMode=0;
  mode--;  
  }
}

if(mode==1){

   if(subMode==0){
  char x [16];
  sprintf(x, "%c%02d:%02d:%02d:%02d %02d%c", timeI,DAY,HR,MIN,SEC,tempC,tempI); 
  lcdPrintText(0,0,x);
    
  char y [16];
  sprintf(y, "%cm %c- %c+ %cx     ", buttonI,  buttonI, buttonI, buttonI );
  lcdPrintText(0,1,y);
   }
     
  if(subMode==1){
    
  char x [16];    
  sprintf(x, "%c%02d:%02d:%02d:%02d %02d%c", timeI,DAY,HR,MIN,SEC,tempC,tempI); 
  lcdPrintText(0,0,x);  
  
  if(subsubMode==1){
    char y [16];
    sprintf(y, "%c Set Time      ", arrowupI );
    lcdPrintText(0,1,y);     
  }
  
  if(subsubMode==2){
    char y [16];
    sprintf(y, "  %c          Day", arrowupI );
    lcdPrintText(0,1,y);     
  }  
  
  if(subsubMode==3){
    char y [16];
    sprintf(y, "     %c       Hour", arrowupI );
    lcdPrintText(0,1,y);     
  } 

  if(subsubMode==4){
    char y [16];
    sprintf(y, "        %c   Minute", arrowupI );
    lcdPrintText(0,1,y);     
  }     
  
  if(subsubMode==5){
    char y [16];
    sprintf(y, "     (C/F)        %c", arrowupI );
    lcdPrintText(0,1,y);     
  }    
  
  if(subsubMode==5){
    char y [16];
    sprintf(y, "     (C/F)        %c", arrowupI );
    lcdPrintText(0,1,y);     
  }      

  if(subsubMode==5) subsubMode==0;
  } 
  
  
  if(subMode==2){
  char x [16];    
  sprintf(x, "%c%02d:%02d:%02d:%02d %02d%c", timeI,DAY,HR,MIN,SEC,tempC,tempI); 
  lcdPrintText(0,0,x);  
  
  if(arrowLoc[0]==1){
  char y [16];
  sprintf(y, "%c Set Alarm 1   ", arrowupI );
  lcdPrintText(0,1,y);   
  } 
  }  
  
  if(subMode==3){
  char x [16];    
  sprintf(x, "%c%02d:%02d:%02d:%02d %02d%c", timeI,DAY,HR,MIN,SEC,tempC,tempI); 
  lcdPrintText(0,0,x);  
  
  if(arrowLoc[0]==1){
  char y [16];
  sprintf(y, "%c Set Alarm 2   ", arrowupI );
  lcdPrintText(0,1,y);   
  } 
  }    
  
  if(subMode==4)  subMode=0;
  if(subMode==-1)  subMode=4;  
  
}

if(mode==2){
  
  char x [16];
  sprintf(x, "%c%02d:%02d:%02d%c% 02d %c%c", batteryI,bdHR,bdMIN,bdSEC,batteryI,tempC,alarmI,lightI); 
  lcdPrintText(0,0,x);
    
  char y [16];
  sprintf(y, "%04d:mAh %04d:mA", shuntMah,shuntMa );
  lcdPrintText(0,1,y);
}

if(mode==3){
  
  char x [16];
  sprintf(x, "%c%02d:%02d:%02d:%02d%c %c%c% ", timeI, cdDAY,cdHR,cdMIN,cdSEC,timeI, alarmI,lightI); 
  lcdPrintText(0,0,x);
    
  char y [16];
  lcdPrintText(0,1,"Day Hr Min TIMER");  

}

if(mode==4){
  
  char x [16];; 
  sprintf(x,"%c Pigs Arduino %c",arrowupI,arrowupI);
  lcdPrintText(0,0,x);
    
  char y [16];
  lcdPrintText(0,1," Mini Os V.1.00 ");  

}

if(mode==5)mode=1;

/*


  char tempRead[5];
  sprintf(tempRead, "%02d %02d", lightLevel,tempC);  
  lcd.setCursor(10, 0);    
  lcd.print(tempRead);    
  
  char shuntRead[14];
  sprintf(shuntRead,"%04dmA %04dMah",shuntMa, shuntMah);
   lcd.setCursor(1, 1); 
  lcd.print(shuntRead);   
  
  */
     
//------------------------------------------------------------------<<LCD


//------------------------------------------------------------------>>Time
unsigned long currentSec=millis();
if(currentSec-previousSec>1000) {
SEC++; 
previousSec=currentSec;
if(shuntMa>1){shuntMatotal=shuntMatotal+shuntMa;}
}

if(SEC==60){SEC=0; MIN++;}
if(MIN==60){MIN=0; HR++;}
if(HR==24) {HR=0;DAY++;}
//------------------------------------------------------------------<<Time




//------------------------------------------------------------------>> Sensors
// 8% difference from meter to arduino reading
int shuntVal= analogRead(shuntPin);
shuntMa=shuntVal*(5.0/1023.0*1000.0*0.92);              //shuntMa
shuntMah=shuntMatotal/3600;                            //shuntMah

//(21%) tempVal*0.21=F degree/ (F-32)X5/9=C degree 
int tempVal= analogRead(tempPin);
tempF=tempVal*0.21;
tempF= constrain (tempF, 0,99);                      // tempF
tempC=((tempVal*0.21)-32)*5/9;                       // tempC

//darkest 50-1010 lightest
int lightVal= analogRead(lightPin);
lightVal=map(lightVal, 50,1010,0,99);
lightLevel=constrain (lightVal, 0, 99);             // lightLevel

//------------------------------------------------------------------<< Sensors

//------------------------------------------------------------------>> Buttons

if(buttonPress[1]!=lastButtonPress[1]){
  if(buttonPress[1]==HIGH){
    mode++;
  }
}
lastButtonPress[1]=buttonPress[1];


if(buttonPress[2]!=lastButtonPress[2]){
  if(buttonPress[2]==HIGH){
    subMode--;
  }
}
lastButtonPress[2]=buttonPress[2];


if(buttonPress[3]!=lastButtonPress[3]){
  if(buttonPress[3]==HIGH){
    subMode++;
  }
}
lastButtonPress[3]=buttonPress[3];


if(buttonPress[4]!=lastButtonPress[4]){
  if(buttonPress[4]==HIGH){
    subsubMode++;
  }
}
lastButtonPress[4]=buttonPress[4];



for(int x=1; x<5; x++){  
buttonState[x]=digitalRead(buttonPin[x]);

if(buttonState[x]!=lastButtonState[x]){
  lastButtonState[x]=buttonState[x];
  if(buttonState[x]==LOW)buttonPress[x]=1;
  else buttonPress[x]=0;
}

} 

//------------------------------------------------------------------<< Buttons



//------------------------------------------------------------------>>
//------------------------------------------------------------------<<
//------------------------------------------------------------------>>
//------------------------------------------------------------------<<
//------------------------------------------------------------------>>
//------------------------------------------------------------------<<

}


//========================================================================================================>>FUNCTIONS

int bPress(int bPin){                                                             //button function
     
}  
  

void lcdPrintText (int x, int y, char* text){
  
  lcd.setCursor(x,y);  
  lcd.print(text);
}  


//------------------------------------------------------------------<<