> That only works if you allocate lists all at once and never modify them.
You can reorder and modify the contents of the list without losing locality.
I mean, if you modify the contents of the list nodes in place, sure. But at that point, you're just doing an array with extra steps.
Changing any of the pointers, however, will make memory prefetch much less efficient. CPUs like linear memory access patterns; they're easy to predict. Chasing pointers is much less predictable, even if the pointers are all to the same region of memory.
If there are any other allocations taking place at the same time -- say, allocations from other threads, or for other data you had to create while building the list, that locality is shot. Same goes if you insert more elements to the list later, or if you perform an operation which changes its order (like sorting it).