Trojan horse types - a type that takes over the function calling it

I had another bad bad half baked idea…

start with something like this:

abstract type GhostArray{F <: Base.Callable, T, N} <: AbstractArray{T, N} end

Where F is materialize or whatever hook you want…

but trick julia into thinking it’s a collection or iterator, so it will collect each value.

So basically make the parent type an abstractiterator or abstractrange. I think that’d be one easy way, but, it would not have the same functionality as an array…