Faster new id array creation

It used to take dozens of milliseconds but
now goes in less than one
Using pre-stored value is a bit faster