In-situ regrowth of GaAs through controlled phase transformations and reactions of thin films on GaAs