I use a simple solution to add value in array
With store i add values in array and after i can use it like variables see my macro code
Macro code
{
"Name": "Array",
"CreationDate": "2021-1-20",
"Commands": [
{
"Command": "store",
"Target": "AAAAA",
"Value": "Var1"
},
{
"Command": "store",
"Target": "BBBBB",
"Value": "Var2"
},
{
"Command": "executeScript_Sandbox",
"Target": "return [\"\",${Var1},${Var2}];",
"Value": "Array"
},
{
"Command": "echo",
"Target": "${Array[1]}",
"Value": "#shownotification"
},
{
"Command": "echo",
"Target": "${Array[2]}",
"Value": "#shownotification"
}
]
}