I'm sorry but you misunderstand the situation. Set theory, type theory and category theory can be used for metamathematics [1] whereas real analysis and number theory cannot. They are foundational theories whereas real analysis and number theory are not. The reason for the difference has to do with the expressiveness of the formal languages and how they themselves can be expressed without a prior language other than formal logic itself.
[1]. https://en.wikipedia.org/wiki/Metamathematics
[2]. https://en.wikipedia.org/wiki/Foundations_of_mathematics