I understand that you are trying to implement cell lists. For orthogonal unit cell (or even better - cubic) the cells that subdivide the unit cell are nicely aligned with the unit cell. Wikipedia has this illustration:
For a non-orthogonal unit cell the calculations are more complex, but you can still use a rectangular box divided into cells. Here is an illustration from the Gromacs manual:
Alternatively, you could subdivide the unit cell into cells that have the same angles as the unit cell. It would make some calculations simpler, but the cells would need to be larger to assure that the search radius doesn't go beyond neighboring cells. So it'd probably be slower overall.
I'm aware that some math or pseudo-code would be more helpful, but skipped it for the same reason it is skipped in books – these things are tedious and are better left as an exercise for the reader. :-)