Added array-backed priority queue implementation and helper functions for it.