effect give @e[type=item] slowness
enchant @e[type=item] sharpness
attribute @e[type=item,limit=1] minecraft:generic.armor get
ride @s mount @e[type=marker,limit=1]
I think that's pretty much it for commands that can affect entities, but not all entity types. Spyglass already does a good job pointing out which commands require a player, but it doesn't currently catch any of these.
We can bootstrap our own manually tracked data for this via ArticData. As for location, I think this would belong in mcdoc via something like a minecraft:entity_feature dispatcher to string unions/enums.
These commands are invalid:
I think that's pretty much it for commands that can affect entities, but not all entity types. Spyglass already does a good job pointing out which commands require a player, but it doesn't currently catch any of these.