Introduce API to create Stack structures

This is quite a straight port from SM, as there is not really much changes.
This is also because since AMXX uses now the same CellArray class, makes the things easier.