Refactored 'array' to make the Array type more clear, and to check for the case when accessing an index outside of the bounds of the currently allocated array. Alos, basic structure of heap.c