Creates evaluation grid for any numeric or non-numeric vector z.
For discrete z (non-numeric, or numeric with at most grid_size unique values),
this is simply sort(unique(z)).
Otherwise, if strategy = "uniform" (default), the evaluation points form a regular
grid over the trimmed range of z. By trimmed range we mean the
range of z after removing values outside trim[1] and trim[2] quantiles.
Set trim = 0:1 for no trimming.
If strategy = "quantile", the evaluation points are quantiles over a regular grid
of probabilities from trim[1] to trim[2].
Quantiles are calculated via the inverse of the ECDF, i.e., via
stats::quantile(..., type = 1).