[Type] Refactor Mat (#4396)remove inheritance and use std::arrayCo-authored-by: Paul Baksic <30337881+bakpaul@users.noreply.github.com>