Or is the stack not actually something like std::stack and something like a vector or just a contiguous piece of memory the VM/interpreter is managing?
Implementation-wise, yes, the stack is most probably contiguous memory, so a "peek" should be quick and easy to implement.
Note that also std::stack isn't really a container, it just wraps a container. Default is std::deque, but it could be any class that implement size, empty, back, push_back and pop_back.
For a scripting language, I would try make sure that func1() would use the variables in place, through pointers, as if they are the variables they are, and not caring that they happen to be allocated on a stack.
So the stack shouldn't be implemented like a std::stack (with the type safety, only being possible to push one type), but more like a custom linear allocator.