Implementing a Heap as an Array