The current M1 SoC package probably can't support more than 16GB RAM without moving to higher-capacity RAM modules, because of the the limited space of the package.It definitely can't otherwise Apple would have offered 32GB configurations at least for MacBook Pro / iMac. Same with 2TB limit.
However, the M1 architecture almost certainly can support large amounts of RAM - depending on the memory controllers, address bus width and the physical size available on the package.
There is nothing inherently preventing the construction of a physically larger M1 variant that has space for more RAM and can include more CPU and GPU cores. Same M1 microarchitecture generation, just bigger.