Array-based implementation of a queue