Dynamic steps in API caller

I need to implement the dynamic steps in the backend workflow. I have 2 custom_field entities in for now and I have a a flow like this:

for each custom_field - setCustomMapping is being run (order does not matter)

but what if I would have not 2 custom_fields but 10 and I need to run a workflow for all of them ? Can I make this dynamic somehow ? Seems only way is to leverage JS - but if I would use javascript Toolbox - can I get all the custom_field list (filtered) ?

Thanks!

we ended up creating custom python endpoint which we triggered from bubble.