Interesting. Got any links about the approach you're taking to decide what would be optimal? It seems like that would be a very difficult problem.
It's actually not hard in principle. There is a very easy algorithm for deciding whether you should use a list or an array: You try it out.
If I fail, I'll write about it some day...