pub fn slice_min_max(data: &[f64]) -> Option<(f64, usize, f64, usize)>
Compute min, max, and their flat indices.