For what it is worth, The Faller Car (FCS for short) system is a HO system that does this. there is a lot of vehicles - trucks, busses, cars and construction vehicles - available.
However, for a period of time, the FCS was also available in N scale, with a small selection of buses and trucks offered. never any cars, since space was very limited, and adding a battery with any reasonable amount of running time was impractical.
The FCS wosk very simply by hiding a steel wire under the road surface where you want the vehicles to travel. The vehicles are each equipped with a motor and battery, and a steering mechanism with a small magnet that would follow the wire. in more advanced setups, they also add reed switches in the road and in the vehicle, with appropriately matched magnets in the vehicle or road. this all allowed for example, a scenario where a specific car (or series of cars) would go into a fuel station, but all the rest would pass. or a bus will trigger a turnout to a bus stop, but cars and trucks will keep straight, etc etc etc... it can get quite complex to get magnets and reed switches tuned for proper operation, but once achieved, very realistic traffic movements could be created, but the biggest downfalls of the system was the very limited number of options of placement of the switches, so most vehicles simply followed the wire. and of course cost. the FCS was, and still is, very expensive.
They do try to compensate by using high end vehicles from Herpa and Busch, but it is still a pile of money to get a moving HO vehicle...
They do not cater for tail lights, headlights, indicators, etc. the new FCS digital system apparently does, but I have not looked into it much... cost is even more horrendous than the original FCS system though.