How to read serial input and check function calls without delay

Hi, Can anyone tell me how to chech both serial incomming characters and at the same time (as timeslot) check values in a function call. It seems that the loop() running through for each characters read. I want all chararacters readed and then call a function. To illustrate my problem, I attach a small code below. If I insert the delay(), it print the incomming characters one at the time every 2 sec. My goal is to read all incomming characters (20 chr) and then go the specific function.

byte byteRead;
int sensorPin = A0;
int sensorValue = 0;

void setup() 
{                
  Serial.begin(9600);
 }

void loop() 
{
  //chkAnalog1();
  //delay(2000);
  
  if (Serial.available()) 
  {
    byteRead = Serial.read();
    
     if(byteRead==27)
    {
      Serial.println();
    }
    else
    {
      Serial.write(byteRead);
    }
  }
}

void chkAnalog1()
{
  sensorValue = analogRead(sensorPin);
  Serial.print("Analog values checked as: ");
  Serial.println(sensorValue);
}

Store the incoming characters in an array until you see the character 27 that triggers printing and then print the array. Don't forget to null terminate the array.

http://www.gammon.com.au/serial

Thanks, The link was very helpfull.