In the @let feature in Enhanced GNU Awk, for those @let blocks that are outside of a function, like in BEGIN or END blocks, I have the compiler allocate secret global variables. They are reused as much as possible between blocks.
$ ./gawk --dump-variables 'BEGIN { @let (a, b, c = 1) { } }'
$ cat awkvars.out
$let0001: untyped variable
$let0002: untyped variable
$let0003: 1
ARGC: 1
ARGIND: 0
ARGV: array, 1 elements
BINMODE: 0
[ .. snip many ]
https://www.kylheku.com/cgit/egawk/about/