Added init matrix from array function