add generic rand! and rand for batch univariate sampling