pub fn truncate_array<const N: usize, const M: usize>(data: [u8; N]) -> [u8; M]
Truncates an array of size N to size M. Fails compilation if N < M.