What do you think the problem is?
The string data does not need to fit into the static array.
The string data is stored dynamically on the heap.
Basically only pointers to the data are kept in the static array.
It's a little more complicated due to "short string optimisation", but that's the general idea.