pub fn array_max<const N: usize, T: Real>(array: [T; N]) -> T