Added generalized method for creating an array of mesh samples with
arbitrary stride.