Any such form of government or any amendment thereof, by act of the legislature or by local law, may transfer one or more functions or duties of the county or of the cities, towns, villages, districts or other units of government wholly contained in such county to each other or when authorized by the legislature to the state, or may abolish one or more offices, departments, agencies or units of go