fn read_primitive_array<T: PrimitiveArrayItemType>( array: &PbArray, cardinality: usize, ) -> ArrayResult<ArrayImpl>