Late reaction, but oh well... this is most definitely possible. You see, armor stands are basically entities. Block entities, sure, but entities nonetheless. Meaning that you can make them /execute commands. As well as teleport them to another location.
Let's start with the basics...
/summon minecraft:armor_stand ~ ~ ~ {Tags:["stand"],CustomName:'"D00mStand"',CustomNameVisible:1}
Don't mind the extra theatrics, I just enjoy that. However... the tag is important because this will make it easier to run our commands. The trick here is to set up a check to see if something is in front, aka facing, this armor stand.
/execute at @e[tag=stand] anchored eyes positioned ^ ^ ^2 if entity @a[distance=..2]
So, we run the command at the armor stand. We anchored the eyes, and then check for something positioned 2 blocks in front of it (the ^ ^ ^2?). But only if any player is within 2 blocks distance. So this will only happen when any kind player is within 2 blocks of the stand, in front of it. Next stop: adding a "run" part which gives it something to 'do'. Like... killing the player ;)
/execute at @e[tag=stand] anchored eyes positioned ^ ^ ^2 if entity @a[distance=..2] run kill @@s
Don't include the extra 'at': I had to use that to prevent the forum from expanding names. You only need one, followed by 's'. This will kill any player that's 2 blocks in front of the armor stand.
As for making the armor stand move... it's an entity, just /tp it! For example something like this?
/tp @e[tag=stand] ^ ^2 ^5 facing ~ ~ ~
This would teleport the stand 5 blocks in front of you, 2 blocks above you (safer if you're looking at the ground) and to make matters worse... it'll even be facing in your direction ;)
Or use an execute command for more control....
/execute as @e[tag=stand] at @e[tag=stand] run tp @s ^ ^1 ^2
^ That would make the armor stand "hop" 2 blocks ahead. Yikes... now imagine that you set up that kill command using a repeating command block... you'd have a "walking" killer armor stand on your hands! 😬
Hope this can help!