I believe we should eliminate `Mat` and use `(Input/Output)Array` only.