Hello,
I have a RefCell<Vec<T>>, and I’m trying to find a way to return a reference (ideally an &, but Ref<T> works too) to an element at a given index inside the vector. I’ve seen things like this and this, but I’m unsure on how to adapt it to a situation where I have to return a reference to an element inside a vector.

If you try this, then the point of RefCell is broken. The reason we return a Ref<'a, T> instead of &T is that without giving the caller a Ref, the lock on the RefCell will be broken before the reference is dropped. Think of a RefCell like a mutex:
If you call .lock on it, you want to make sure noone else can touch the data inside, therefore returning a reference from .lock would have no way to tell the Mutex that it’s okay to unlock it.