Obviously T is not a type here, it's a value but I've used it as a demo of what I want to achieve. Basically I want to call let v: [u8; 5] = s.magic::<u8; 5>().unwrap().
Note that this uses the data type already being stored, as you'd expect. You can explicitly specify the number of items desired by doing foo.magic::<5>(), or you can let the compiler possibly infer it.
This is amazing. I've been seeing posts about const generics on reddit for a while now without really understanding what it means, and suddenly it is a solution for my problem. Thanks alice and jhpratt!