Naturals: https://en.wikipedia.org/wiki/Pairing_function
Reals: https://en.wikipedia.org/wiki/Space-filling_curve
The caveat is that a function, like the evolution of the universe, General Relativity, differential equations, would be possibly unwieldy and unaesthetic when written on lower dimensions, and locality might also be lost.
Some techniques try to preserve locality:
https://en.wikipedia.org/wiki/Z-order_curve
The takeaway is that any object, nomatter how complex, can be represented as a single number. That is the basis of Godel Numbering: https://en.m.wikipedia.org/wiki/G%C3%B6del_numbering
Respectfully, your argument just boils down to whether the real numbers actually "exist." And I airquote exist because even that term is loaded.
This HN delved into it: https://news.ycombinator.com/item?id=14080024
It really just boils down to the nature of incompressible infinities.
You may enjoy this video that explores some of the issues with unresolvable infinities:
https://libraryofbabel.info/bookmark.cgi?concernedcoder00001...
But decoding any meaningful information has to be at least in two dimensions....
In two dimensions, you can describe everything.... the other dimensions are not needed (and perhaps just emerging, according to the holographic principle)....
What does this mean?
Everything we do in computers is encoding information in long numbers. Every character is a single number, every file is, every disk image is, every state of RAM, every database, every cache, every piece of source code.