Expand array using realloc().