Allocate vector lazily.