A function, like a loop will be executed on a single tick.
Do you need your loop to go through all the elements.
If for example you are looping through each instances of an object type and want to do a specific action on a specific instance, once you found it, use the stop loop action, it will prevent from looping through the rest of instances which we know are wrong/not the one you are looking for and can allow you to freeze your application less.
If you want to not freeze the execution, yet still, each tick analyse through a bunch of the instances (but enough that you don't feel the freeze), it depends in great part on your project's code, but you could increment the value of a global variable each tick, and use this value to pick an instance (through its IID possibly ?) and analyse only this instance through a specific event.
Still a "loop", but which execution goes over several frames of execution.