It sounds like prefer something similar to the "Redim" statement in VB.net, which will set all values to 0 (unless you add "Preserve"). I don't think there is anything similar in PLC Structured Text. I was told that arrays cannot be dynamically dimensioned. It seems you will have to loop thru the array in a For statement and set each term to 0, which takes 3-4 lines of code.
joan is fast way, not 61131 anyhow.
see for othe solutions www.oscat.de nice library for codesys.
the best way is to use a loop.
it is not needed as the data will be overwritten when you fill it again, the memory is still occupied. and you can better clear it after use directly.