simple automatic expanding pointer array implementation