The call Vec.toEnum makes a new enum vector now.

The call makes a new adaptation vector which provides
a transformation between old vector values and new enum values.
The new vector is identity vector if old vector is already enum.

In all cases the caller is responsible for deletion of a new vector.