There's no easy way that I know of.
Lua has coroutines that work like that, but don't think they're available in factorio's lua in particular.
And even if they were, doubt they could've been used in the context of this mod, as factorio doesn't allow to put code objects into savegames, much less running code objects with some kind of frozen state in them.
One way to implement it can be some kind of special syntax for splitting code string into multiple parts to run separately, but that'd break your example above immediately due to if...end block, and I think would be much more clear to implement yourself, rather than relying on some weird templating magic full of special-cases (like that "no blocks" rule).
So yeah, doesn't exist, and don't think there's a good way to implement it in the context of the mod itself.
But should be fairly obvious for how to do such thing with the combinator code, as you can save state between runs in globals or even "out" var.
E.g. something like this:
if var.flush then
irq, out, delay, var.flush = 'signal-0', {}, 1e10
return
end
out['signal-x-tile'] = test_ul_tile_x
out['signal-y-tile'] = test_ul_tile_y
out['zone-x-green'] = 1
...
var.flush = true
For splitting code into even more such blocks, I'd recommend using common "state machine" pattern:
https://mods.factorio.com/mod/Moon_Logic/discussion/62299bb657d5edc3b2da26dd
Which allows to debug the code and reason about how it works very easily, once you explicitly track which block will be run next and can see all possible transions from there. ("var.flush" in example above is kinda that "state" in its simpliest boolean form)