Initialize heap with array