Address js Array Variables in SQL

Here's a really easy question to answer (I hope) but slightly more difficult to write...

If I take the output from a Retool SQL query and format it as an array and use that array to populate a js array variable, can I then use that array variable as an entity within subsequent Retool SQL queries?

In simple terms, can I use js array variables as temporary tables?

Here's the js that I'm using to populate the array variable:

await variable1.setIn(formatDataAsArray(;