I was thinking I'd use a geometric data structure that could morph from one data structure type to another.
This is amusing theorycrafting, and reminds me of the invention of the CAR compression algorithm. I'm very eager to see your implementation of such a feat.
But not here, this is not appropriate for For Beginners. Moving you to General Programming.