Implements an array-based queue