These rules have two entirely separate triggers, and if a single attack satisfies both, then so be it.
The attack reduced the creature to 0 hit points, and it was a melee attack. So you can choose to knock the creature out; it's now unconscious and stable.
However, there was leftover damage from the attack equaling or exceeding the creature's maximum hitpoints. So it dies.
The end result is that the creature is dead. If you're worried about realism, this is a perfect outcome: If you're trying to knock someone out, but you hit them hard enough to kill them, they die, regardless of your intentions.
For Constructs (such as Animated Armor), no.
Monster Manual pg.19 covers this.
Constructed Nature.
An animated object doesn't require air, food, drink, or sleep. The magic that animates an object is dispelled when the construct drops to 0 hit points. An animated object reduced to 0 hit points becomes inanimate and is too damaged to be of much use or value to anyone.
As for golems, which are much more powerful construct, the answer is still no.
Monster Manual pg.167 covers this (emphasis mine):
Blind Obedience.
When its creator or possessor is on hand to command it, a golem performs flawlessly. If the golem is left without instructions or is incapacitated, it continues to follow its last orders to the best of its ability. When it can't fulfill its orders, a golem might react violently-or stand and do nothing. A golem that has been given conflicting orders sometimes alternates between them.
A golem can't think or act for itself. Though it understands its commands perfectly, it has no grasp of language beyond that understanding, and can't be
reasoned with or tricked with words.
As for undead, yep, nothing seems to prevent that.
So I looked up ghouls, ghosts, skeletons, and zombies to see if any of them had the 0 HP limit like armor does. The answer is no. Interestingly enough, the skeletons can even use their brain and think through rudimentary problems. It seems undead have a little more agency in 5e. So it looks like you could knock out an undead, which makes sense. I mean, vampire spawns are undead, and they sleep, which means they have an unconscious state. Even mummies sleep until you step into the plot device that wakes them up.
Exception
Helmed Horror - MM pg.183 (Intelligent construct). It has Constructed Nature, but does not become useless armor at 0 HP as it is not explicitly stated. You could of course rule that Constructed Nature makes it that way, however a Helmed Horror is specifically imbued with actual Intelligence.
Best Answer
To answer your question from a rules-as-written perspective, no. There are no rules for sapping, choking, cold-clocking, etc. that would allow you to bring an enemy to unconscious without first dropping their HP to 0.
I should point out something, though: choosing to knock a character unconscious at 0 HP instead of letting them go to the dying stage is specifically not hurting them to the point of death. In D&D 5e, characters don't die when they reach 0 HP, and they don't even start dying unless their attacker wants them to die at 0HP.
Otherwise, it's pulling the last punch so they safely fall unconscious at 0HP. This does not, however, prevent them from going into dying if they take further damage.
On the other hand, there may be other ways. For example, Drow (the 1/4 CR monster entry from the MM, pg 138 maybe?) have a poison effect on their crossbow attacks that knocks the target unconscious for an hour if the CON save fails by more than 5. I'm sure there are ways for PCs to get poisons that behave similarly. As with many things in 5e, this is more in the realm of "ask your DM" than it is in the realm of hard rules.