ForeEachLoop Crashing the game :( I don't understand why

You are removing objects from the array while you are iterating it with ForEach. I’m pretty sure that is the source of your crash. Manipulating the array in certain ways while going through it will invalidate the iterator and can cause a crash. Instead what you can do is have another empty array called “ToBeRemoved” and add your tiles that you have already carried over instead of removing them from TemporaryTiles outright. Then you can remove all the elements of ToBeRemoved from TemporaryTiles after your ForEach is finished, before you increase SortNumber.

Hope that helps.