For antipersonnel use, guns are perfectly adequate and guns on tracking turrets have been widely deployed (for example, CIWS). The underlying technology is a ballistic calculator and a fast panning turret. Modern ballistic calculators, weather stations (a small device about the size of a cellphone), and good quality ammunition allows for incredible precision with small arms -- hitting something 25cm in diameter at 1000m is something people can do with these tools.
A weapon like this can't really "mass kill" -- it is for point targets -- but we have long had tools that can automatically track and kill. Why don't we employ them to shoot at people? We have the tagging technology, &c, as you mention.
One reason is that positive identification really does matter a lot when designing and developing weapon systems that automatically attack something.
The anti-missile use case is one of the most widespread uses for automatically targeted weapons in part because a missile is easily distinguished from other things that should not be killed: it is small, extremely hot, moves extremely fast, generally up in the air and moves towards the defense system. It is not a bird, a person, or even a friendly aircraft. The worst mistake the targeting system can make is shooting down a friendly missile. If a friendly missile is coming at you, maybe you need to shoot it down anyways...
Drones have a different signature from a missile and recognizing them in a way that doesn't confuse them with a bird, a balloon, &c, is different from recognizing missiles -- but here again, the worse thing that happens is you shoot down a friendly drone.
Range is limited in urban environments because of obstructions -- even the range of CIWS is far too great to be useful.
There hasn't been a real possibility for a long time, I don't think -- it's just not an easy use case.
Are you a male older than 13? You are a combatant and will be killed once you are in sight.
This is exactly the kind of thing that is unworkable.
(A) You don't want to shoot all those people. It's rare if ever the case that even 10% of those males are actually combatants. Even in Germany at the end of the WW2, I doubt it was that high.
(B) What if your own people make a breakthrough and take control of an area, and have all these machines with wildly nonspecific rules shooting at them?
Now, you may think I have the facts wrong, here -- that we haven't had the kind of precise turret before, or that we can't deliver small arms ammunition with great precision -- but you don't come out and say that: you haven't said I have bad facts.
If we accept that the technical capabilities have been there for a while, then we need another explanation for what the hold up is. I have offered an alternative, which is that it comes down to doctrine or operational issues -- it's not easy to see how to deploy a weapon system that automatically targets people without creating huge practical problems. I offered two concrete cases in my earlier comment. Here again, you haven't really spoken to them: you haven't said, for example, A is not a problem and here's why not. You have just ignored them.
It is really starting to look like you have a story and you are sticking to it.
(A) "...bullets move slow, can miss causing obvious damage to surrounding infra..." -- In other words, the precision I say is possible with small arms isn't realistic. This has two consequences:
(A1) The bullets can miss. Consider a bullet on its way to a target 500m way -- it may be in the air for more than half a second. Maybe the target was walking forward at 1m/s and just stops walking forward -- then the bullet will pass 50cm in front of them. This kind of miss is unacceptable can prevents technology like the kind you imagine from being deployed.
(A2) If the bullet misses, it will put a whole in a wall, &c, &c, whereas a laser either (A2A) will not miss or (A2B) won't cause a problem if it misses?
Regarding (A2A) and (A2B), are either or both of them something you had in mind?
(B) "...they are loud..." -- Firearms are loud but it's hard for me to say what you think the contrast or relevance is here. The lasers are silent or nearly so? Or the firearm's sound creates a problem for some other reason?
(C) "...minaturization is important to making this a real trend..." -- Firearms are not small enough. You said earlier that "...I think this is taking a miniaturization turn..." but how small do you think these lasers need to be, for the reality that you're concerned about to come into play?
And the Lavender system was only deployed once it was doing as good as the humans. It isn't 100%, war never is.