Type-cast a vector component-wise

This allows one to e.g. cast a vector of f64s to an equivalent vector of f32s. More generally this is allowed for arbitrary NumCast types.

Note that this is based on top of #141, as there were some merge conflicts.