Queue data structure based on array