Define a type alias for an Array of indices that point to the array

I want to define a type alias for n-dimensional arrays of n-dimensional cartesian indices (so an array
that holds indices that are able to index that array). I tried

julia> MyType = Array{CartesianIndex{N},N} where N

and get as expected

julia> isa([CartesianIndex(1), CartesianIndex(2)], MyType)
true

but unlike wanted also

julia> isa([CartesianIndex(1,1), CartesianIndex(2,2)], MyType)
true

even though the dimensions don’t match in the second case. How do enforce that the dimensions
match in the type alias?

Bonus points if I can make it AbstractArray{CartesianIndex{N},N} instead of Array. So far
that also doesn’t work, probably because

julia> Vector{Int8} <: AbstractArray{Integer}
false

Can you try on Julia 1.6rc1? I get

julia> isa([CartesianIndex(1,1), CartesianIndex(2,2)], MyType)
false

I also have

julia> [CartesianIndex(1), CartesianIndex(2)] isa (AbstractArray{CartesianIndex{N}, N} where N)
true

Oops, I had a comma missing between the CartesianIndex(1,1) and CartesianIndex(2,2) turning the whole thing into a (1,2)-Array. So really my fault there