Is there a way to declare an empty array as a local variable (local!a) --> Perform some operations in another local variable(local!b) and append the results to local!a.
Discussion posts and replies are publicly visible
No. Variables in Appian are immutable, following the functional paradigm of the SAIL expression language. But you can just create a new variable holding the values. And, you do not have to declare a local variable, just to define the output of your expression.