Dynamic stack for generic data structures.