Some functions like Base.copyto_unaliased! is dispatched based on IndexStyle. So I think the consistency between IndexStyle and eachindex also helps to pick the correct branch.
I agree this would be nice, but IIRC last I looked at it (likely four+ years ago) there were ambiguity challenges because it means that every custom array needs to specify both their vector and arbitrary dimension behaviors.
Looks like IndexStyle for Base’s Array types are all defined using Type{}
Maybe we can add IndexStyle(::AbstractVector) = IndexLinear() to partially realize the goal? (IndexStyle(typeof(v))) is rarely used I think)
It would be pretty bad if IndexStyle(a) and IndexStyle(typeof(a)) returned different things. Traits like IndexStyle are meant to be specific to a type; that you can call them also with an instance of that type is just for convenience.