Make `map()` and `invoke()` type-stable

By adding vectorised output version `map_v()` and `invoke_v()`.