Finish the vector implementation with the dispose and replace element functions.