Add stack array implementation