small vector util function to ensure copy vs move