Linux has this, but it is, as you say, underused.
https://man7.org/linux/man-pages/man2/personality.2.html