nwrap: Use nwrap_vector_foreach instead of for loop