Saving Values to Array.

The code below reqires someone to enter their mobile number, when that number is confirmed by '#', then a random generated code will be sent to that number. However I want to store these random generated numbers in a array. This array will save randNumarray[] = { a, b, c, d, e...}; So far, as metioned in the code below, everytime this loop is called, ranNumber (random number) is saved to A. I want to save randNumber to variable A, then next time i run this loop. save randNumber to variable B, then third time to C... and so on...

void keypadentry()
{
 char key = keypad.getKey();
 
 if (key)
 {
   if (key == '*')
   {
   memset(entryStr, 0, sizeof(entryStr)); 
   i=0;
   key=0;
   Serial.println("");
   Serial.println("Canceled");
   } 
   
   else if (key != '#')
   {
    
     entryStr[i]= key;
     i++;
     Serial.print(key);
     }
   
   else 
   {
   Serial.println("");
   i=0;
   key=0;
   
   String fileName = entryStr;
   memset(entryStr, 0, sizeof(entryStr));
   
   Serial.println(fileName);
  sim.println("AT+CMGF=1");    
  delay(1000);
  sim.println("AT+CMGS=\"" + fileName + "\"\r");
  delay(1000);
  String SMS = "Your Exit Code Will Arrive Shortly";
  sim.println(SMS);
  delay(100);
  sim.println((char)26);// ASCII code of CTRL+Z
  delay(4000);
  sim.println("AT+CMGF=1");    
  delay(1000);
  sim.println("AT+CMGS=\"" + fileName + "\"\r");
  delay(1000);
  randomSeed(analogRead(0));
  randNumber = random(10000,20000);
  int SMSA = randNumber;
  sim.println(SMSA);
  delay(100);
  sim.println((char)26);
  delay(1000);
  lcd.clear();
////////////////////////////////randNumber = A;
///////here i want to save randNumber to variable  A, then next time i run this loop. save as B, then third time to C... and so on////////////////////////

   }
 }
}

Is 'entryStr' of type String? If so, writing over the object with zeroes is NOT a safe way to empty the String.