julia> methods(extrema)
# 8 methods for generic function "extrema":
[1] extrema(s::BitSet) in Base at bitset.jl:418
[2] extrema(r::AbstractRange) in Base at range.jl:579
[3] extrema(x::Real) in Base at operators.jl:486
[4] extrema(A::AbstractArray; dims) in Base at multidimensional.jl:1531
[5] extrema(itr) in Base at operators.jl:451
[6] extrema(f, x::Real) in Base at operators.jl:487
[7] extrema(f, A::AbstractArray; dims) in Base at multidimensional.jl:1542
[8] extrema(f, itr) in Base at operators.jl:468
there isnt any optimized implementation of extrema(x::AbstractArray),
so its good to do. the only thing that makes me worried is how to manage not standard indices