lightweight utils(array, matrix)