Is post processing required for data dependent on other rows?

I’m trying to generate some records containing data that is dependent on other rows in the dataset. There are two different dependencies, and I’m assuming that the correct solution is simply to process the generated data to satisfy the requirements. I just wanted to check that I’m not missing something.

Dependency 1
A field in a JSON Array needs to contain a specific value in one instance only, while the other values need to be picked from a custom list. I assume here that I just generate the data from a custom list then process the resulting data to overwrite the first instance in the array with the mandatory value.

Dependency 2
A field needs to contain a sequential count based on the value of another field. e.g. If the field called ‘room’ contains the value 1 then the field ‘sequence’ should contain the next number in the sequence associated with room 1. Room 2 would have its own sequence and so on.
I assume here that I process the generated data and update ‘sequence’ based on how many of room ‘1’ (or whichever) have already been seen in the data.

You can generate values based on other fields in your schema using Formulas. Here’s a video on Formulas: