hi Alejandro. i think what you need is append function. something like:
{def $myarray = array()}
{set $myarray = $myarray|append( $node )}
but, without knowing properly what you are trying to achieve, i would say, in general is not a good idea to fetch all nodes and add them to another array only if they pass specific conditions.
if those nodes are taken by a fetch, i would go for a way (probably a custom function or whatever) trying to only return the nodes you need from database, instead of fetching all if you don't need all of them.
if those nodes are taken by a fetch, i would go for a way (probably a custom function or whatever) trying to only return the nodes you need from database, instead of fetching all if you don't need all of them.
An extended attribute filter would probably be the best.
--
Nothing is impossible. Not if you can imagine it!