Matrix approach to discrete fractional calculus III: Non-equidistant grids, variable step length and distributed orders