Replace arrays with vectors