fn write_array_elements<S: AsRef<[u8]>>( writer: &mut impl Write, elements: &[S], ) -> Result<(), Error>