Question #1: As an example lets use linux bootable stick. you stick it in and you can use the whole operating system without even installing it. What i would like to do is have my code on SD card and plug it in a device of my own (arduino board) and have this arduino execute code (without copying it in to the flash) with ability to select which part of the code it executes. so it is like bunch of independent programs on SD card.
That's not a question. But you can do this because your computer copies a program from the USB stick into RAM, then executes it from RAM. That program loads more programs from the USB stick into RAM. Specifically the BIOS/UEFI loads the bootloader, which loads the kernel, which loads all your programs. At no point is anything executing from the SD card; it's all executing from RAM (and the BIOS executes from flash).
The AVR chip used in the Arduino cannot execute code from RAM, only from Flash. There is no way to execute code from RAM because of the way the chip is designed.
You could invent your own programming language, and write an interpreter that reads instructions from RAM or from an SD card. It won't be incredibly fast. There are plenty of resources for writing interpreters on the Internet.
Question #2: And again linux example, basically it copies the OS in to RAM and executes it from RAM, since there is no external ram on any of the arduino boards how can it be attached[?]
The AVR chip used in the Arduino has internal RAM, but not very much. It doesn't support adding more RAM to work with your program automatically, but you can still write a program that accesses a RAM chip by using the digital pins.
, maybe using some DRAM controller could help ?
Possibly. Probably not. I'm not aware of off-the-shelf DRAM controllers that are suitable for use with an Arduino - usually they're integrated into very complex chips (like CPUs). You can use SRAM, or you can look for "PSRAM" or "pseudo-SRAM", which is DRAM with a built-in controller that makes it look like SRAM.
for example attaching 2 GB of ram.
2GB is quite a lot. For 2GB you will probably need to go with DRAM, unfortunately. I can't tell you how to control DRAM from an Arduino but if you really need this then maybe ask a specific question about it.
Do you really need 2GB of RAM? It will take a long time to fill it up at Arduino speeds. If you just need 2GB of storage, consider an SD card.
i know it is overkill or an 8 bit controller, but what if i would like to add more ram to lets say cortex M33 which is 32 bit controller
Some of the STM32 microcontrollers (which are based on the Cortex M33) do have a "FSMC" block, or "Flexible Static Memory Controller", which allows them to automatically access various kinds of external memory, including SRAM and Flash. There should be more information in ST's datasheets and application notes, and Google.
and i am doing some video processing and i need space to store video, results of processing, and store a program that does processing.
Usually a microcontroller is processing video in real time (otherwise you'd do it on your PC). So you should only need to store a few frames of video - not 2GB.