zl_where(mask, a, b) is mask * a + (1 - mask) * b for a mask of 0s
and 1s. zl_clamp() limits values to [lo, hi]. zl_tri() keeps one
triangle of each matrix, as lower.tri() and upper.tri() select it,
and sets the rest to zero. zl_clamp() has no gradient.
Usage
zl_where(mask, a, b)
zl_clamp(x, lo, hi)
zl_tri(x, type = c("lower", "upper", "lower_strict", "upper_strict"))