Implements Stack using array