Mapping spherical coordinates onto faces of an icosahedron
The approach in your comment certainly works, and is probably your best bet.
If you think of the Platonic solid centred at the origin, then the coordinates of a a point located at the centre of each face is equal (up to normalisation) to those of a vector normal to the face. So you can, in principle, take a point on the sphere, search all the faces and find the face/normal whose dot product with the coordinates of the point is greatest.
This is surprisingly efficient on modern hardware, because it can use vector instructions effectively.
Do be careful about the fact that the Earth is not spherical. I don't know how these cartographic map projections deal with this (it may not matter with paper maps), but I imagine you would use the normal to the ellipsoid rather than the coordinates of the point on the ellipsoid.
Interestingly, mapping a normal vector to an octahedron is a particularly interesting case because an octahedron can be unfolded into a square. This is such an important problem that there are even survey papers on the topic.