How to add hundreds or thousand I/O pins to a microcontroller?
how to access all 256 pins to read and write from/to them simultaneously?

Not at all. Simultaneity requires the same amount of inputs, and you have less.
Normally, you'd just use a parallel-to-serial shift register as input, or a serial-to-parallel shift register as output here, if you need to interact with all pins regularly, instead of just selected ones.

Solution 2: using i2c GPIO chips. but GPIO chips have limited number of pins (for example 100 pins); how to use them for hundreds or even thousands pins?

Basically, same idea, you have a serial bus (I²C) and some logic that glues IOs to them. There's large IO expanders. For thousands of pins, they might be a bit small, but you'd get pretty far.

Solution 3: i think (but i dont know is it possible in electronic industry or not?) by creating a microcontroller like a cpu chip in the shape of surface with thousands pins.

Well, that's commonly done with high-pincount FPGAs. It's not one of the most exciting things you can do with an FPGA, but &quot;digital glue&quot; really is one of the main use cases for FPGAs.
If you're building a couple hundred thousands of these, or need to be really energy-efficient (albeit switching thousands of pins - sounds unlikely), then you might look into getting someone to design custom silicon chips for you.

But: none of this is something that's universally applicable. It all depends on what your input and outputs need to do (voltages, currents, stability, speed) and how often and in which patterns you need to access them. You'll need to go in much more application detail and write down definite specs before anyone could give a recommendation.