Changed Rust implementation to use (fixed size) arrays rather than vectors.