new-array creates new <array>. An array is an indexed array, with a number as an index, and with a string as an element in the array.
A Golf array is flexible, which means that it will grow to accomodate your needs. By default, an array allocates room for 256 elements that can grow up to 1,000,000 elements, unless <max-size> number (in "max-size" clause) is specified in which case it can grow up to <max-size> elements. <max-size> must be at least 256.
Note that max-size specifies only the upper limit of allocation. The actual amount of memory allocated can vary greatly, and is only 256 elements for a new array.
With a Golf array, you do not need to pre-size the array; rather when you write an element, it will resize automatically. For instance, you can set an array element arr[0] and then arr[1000] (with nothing in-between), and Golf will automatically extend the array to accomodate. Note that an array will not automatically contract when tailing elements are deleted. Use purge-array to delete all elements in the array and shrink its memory footprint when your processing is done.
Scope
Note that an array is accessible to the current request only, unless "process-scope" clause is used, in which case all requests served by a process can use it (see do-once for a typical way to do this).
If "process-scope" is used, then <array> will keep its data across all requests in a given process. See write-array for an example of a process-scoped array.