Update Stack using array