Replace array with vector