Create a constant array of strings
You can use dynamic arrays and try this:
var FMyArray: TArray<string>;function MyArray: TArray<string>;begin if Length(FMyArray) = 0 then FMyArray := TArray<string>.Create('One', 'Two', 'Three'); Result := FMyArray;end;
While this does do a run-time initialization of a dynamic array on the heap, it also shows that Delphi supports a "pseudo-constructor" on dynamic arrays that allow in-place initialization. (NOTE: the above code isn't thread-safe).
Now all you need to do to find out the length of the array, is use the Length() standard function, or to find the allowed index range, use the Low() and High() standard functions.
If you're using an older version of Delphi, replace the TArray with your own dynamic-array string type such as:
type TStringArray = array of string;