@Harry1
Take a look over the documentation on Patch. Patch is a universal function that can take various parameters.
One of those is to use what they call a BaseTable parameter - which is a table of records to patch.
Patch is magical in that the ONLY thing you need for it to determine what to do is the primary key of your datasource. If you provide one, it will find that record and modify it. If you don't it will create a new record.
The drawback to using a ForAll like a ForLoop is that the intention of it is to return a table that contains records based on formulas evaluated for each iteration of the supplied table (parameter 1) and create records from the provided formula/record (parameter 2). If you look at the docs on ForAll, you will see this stated in the Return Value section.
And although the ForAll can be used as a sort-of ForLoop, it was not its intended purpose (thus why you cannot just supply anything you want in the second parameter - such as setting variables.)
Since PowerApps is not a development environment, programming principles like ForLoop and such are not really applicable here. It is a platform that lets you design formulas to provide values for what you are intending to do. It is modeled after Excel.
But to sum...the ForAll being used to do in internal patch will be much less performant than simply having the ForAll supply a table of records to work with.
Also, consider that each function in your ForLoop will have values returned. i.e. Patch returns a record of the Patched record. ALL of that is going into a Table as a result of the ForAll. So, it is building a table with returned results that ultimately goes no where when used as a ForLoop...so it is wasted. (this is also mentioned in the docs under the taking action section).
Again, doing that will cause the entire process to take much more time and consume more memory in the process.
Also, for performance purposes...look at other functions you might use - like Remove - it also works much better when supplied a table and not used in a reversed ForAll.
Hopefully this is clear and helpful for you. And...glad you got the other one working!