Initial TArray implementation and a few other changes