Frustratingly, creation of an empty array of a given size is not functionality that is natively available in polyscope. Fortunately, there has been a workaround posted as part of this thread. It requires a setting up an XML-RPC call that returns an array of the required size. I put together a feature requrest about gett better array functionality natively in polyscope a while ago, if you could drop a like there to get it more attention it would be appreaciated.
Hope this helps.
Thank you Sam for your kind interest.
We have a script file that allows you to dynamically build an array of a given size up to around 250 elements. It also allows you to prefill the elements with a value so you can create Boolean, number or pose arrays.
We also have the ability to return an array via XMLRPC.
Thank you mbush I will search about XMLRPC most of the keywords for dynamic array is releated with it