statically indexed container in rust

One "trick" to keep bindings linear is to have an Option<T>

For instance

struct Unfold<F, S>(Option<S>, F);

impl<F, S, A> Iterator for Unfold<F, S>
where
    F: FnMut(S) -> Option<(S, A)>,
{
    type Item = A;

    fn next(&mut self) -> Option<A> {

        //STATIC BEATS LINEAR
        let s = self.0.take().unwrap();

        if let Some((s_next, item)) = self.1(s) {
            self.0 = Some(s_next); //That's cool we can construct. And we can assign. 
            Some(item)
        } else {
            None
        }
    }
}

fn unfold<S, F, A>(s: S, f: F) -> impl Iterator<Item = A>
where
    F: FnMut(S) -> Option<(S, A)>,
{
    Unfold(Some(s), f)
}

This allows us to not have to move self.0, in a pattern match, which would be impossible as we only have a &mut self as per implementation of the interface Iterator.

In order to apply this trick we need to now statically what we take. in the case of an option = 1+a there's only one thing to take. but in general, we could apply this to any statically indexed "container" like : 1+ (a * (1 + a)) or more exotic structure than a plain linear index.

Are there some indexed container data structure in rust ?