method to get plain array versino of matrix