Webcore - Alternative Methods for Dynamic Population in Set Variable Task

I'm exploring options for streamlining my tasks and wondering if there's an alternative approach to setting a variable. I currently have three tasks set up in a piston as follows (see screenshot),

and I'm aiming to condense them into one by employing either a "For Each Loop" (preferred method) or a "For Loop" to handle their population. However, I'm encountering an issue with the Set Variable task as it doesn’t offer any options for the Variable in its dropdown list like an expression (see screenshot).

I need to dynamically populate it utilizing a lookup like arrayItem(indexOf(x,y),z). Could anyone suggest an alternative method for setting a “Set Variable” that might bypass this limitation?

Thanks in advance for any insights!