pub fn coord_to_offset(coord: &[u64], coord_bounds: &[u64]) -> u64
Convert a coordinate to a linear offset.