Trouble understanding interplanar spacing using miller indices
The lattice planes are a property of the lattice based on dividing up the unit cell. The cell can be divided up indefinitely to give all the Miller indices for example $(\bar{10}\;20\;0);(10\;23\;20)$ etc. Atoms do not need to be on a lattice plane to add to the diffracted signal. The structural information is in the intensity of the diffracted spots not their position. (2 2 4) is parallel to (1 1 2) etc. as shown in the figure. In the general case it is usual to use vectors to find the perpendicular distance using formulas for finding a point at a given distance from a plane.
(Edit. I added (2 2 4) to indicate that it is a different plane but parallel to (1 1 2), in crystallography it is conventional to make all parallel planes have the same Miller indices, (h k l) (as they all scatter in the same way) by removing any common factor. )