Create elem and elem_mut methods for accessing matrix elements