I have a ForEach activity where inside each iteration, I need to set a few iteration specific variables. I can achieve this by using variables defined for the pipeline (pipeline scope), but this forces me to run the loop in Sequential mode so that multiple iterations running in parallel will not update the same variable. What I really need is the ability to define these variables within each iteration (iteration scope) so that I can run the ForEach activity in parallel mode.
I've considered creating a SQL dataset where I could do a lookup for fake values (SELECT 1 AS var1, 2 AS var2) just to get a structure where I can set and use those values, but that seems really lame. I've also considered using an array variable type with the AppendVariable option, but that introduces a lot of custom parsing.
Would be nice if I could just have an InMemory dataset that doesn't have to be tied to a data source where I could use it as a structure inside my ForEach iteration. Does anyone have any other ideas about how to set iteration specific variables inside ForEach loop?

