you need to make sure there is enough memory pre-allocated
if you define the array as a 2D array then you'll have storage
char messageList[10][20]; // 10 messages of max 19 characters + 1 for the mandatory trailing null char
this reserves 10 x 20 = 200 bytes of memory where you can store your strings. So careful on how much you allocate depending on your Arduino's SRAM
so you could do something like this
const byte maxCount = 5;
const byte maxStringLength = 20;
char messageList[maxCount][maxStringLength] = {"str0", "str1", "str2"};
void setup() {
Serial.begin(115200);
// print all the strings (some are empty)
for (byte i = 0; i < maxCount; i++) Serial.println(messageList[i]);
// you can use strlcat to concatenate without overflow
strlcat(messageList[0], " and more", maxStringLength);
// you can use strlcpy() to initialize a string without overflow
strlcpy(messageList[3], "some new text 3 ", maxStringLength);
// print all the strings (some are empty)
for (byte i = 0; i < maxCount; i++) Serial.println(messageList[i]);
}
void loop() {}
how much memory you want to use
which is done here
char messageList[maxCount][maxStringLength]
with your version
the compiler has
no idea
how many strings you want to store and how long each string is
if you don't want to specify how long each string is use variable-type String
until your code crashes because careless re-assigning values to Strings eats up all memory over time