check if an array is heapified