A bespoke `mktempd` script is one of the first things I install in a new system. Fortunately, it is not too hard to make a `mktemp -d` compatible script with POSIX tools. `set -o nullglob` is another story :D
[1]: There's some explanation in this recent post: https://dotat.at/@/2024-10-22-tmp.html
Unfortunately, it is one of the very few directories that are somewhat POSIX-"guaranteed" writable by a non-root user and the fact that on modern systems it is usually mounted on a tmpfs makes it very attractive for pure POSIX usage without rich array support.
If you have mount permissions, of course, you should tell your `mktempd` to base its directory on a private tmpfs.