Both of those function is native to JASS, it is not a custom movement system.
The difference between SetUnitAnimation and ByIndex is that ByIndex more accurate, I believe ?
It does not have vague string like SetUnitAnimation like "stand" or "stand 2", etc.
Also, taking argument from Integer compared to String, I think Integer more faster, just like in Hashtable, we use Integer compared to String mostly.
As said, by combining SetUnitAnimationByIndex + SetUnitX/Y, you can move your unit while doing the animation while attacking, because SetUnitX/Y does not interrupt unit's current order.