Don't reinvent the wheel.
tce-load takes cares of what you need.
Cloud mode:
Extensions are stored in /tmp/tce/optional
i.e. in the RAM
Mount mode:
Extensions are stored in /your/disk/tce/optional
tce-load first creates a loop file system at /tmp/tcloop, then symbol-links all the files in the tcz to their respected position in the system.
Copy mode:
Extensions are also stored in /your/disk/tce/optional
The contents in the tcz are copied into the RAM.
If the file tce/copy2fs.flg exists, every extension will be load in copy mode.
If only the tce/copy2fs.lst exists, only the extensions listed in that file will be load in copy mode.
From what sourse Application extensions are copied into RAM instead?
The local tce directory.
The difference between mount mode and copy mode is that, when you boot up by copy mode, no partition in your disk is mounted (except for swap).