Seems to me slightly complicated, especially related to the character
variable lengths. What does it do with CHARACTER(1) instead?
As well as I know, the array constructors get the length from the first
element, which in this case is a variable. I think you can put a
CHARACTER(1):: at the beginning of the array constructor to tell
it the length. In some cases, that is required. You might also
try it with other lengths.
Note that a character array has all strings of the same length.