how to convert an integer to binary in Arduino?

Most of those go from string to number, OP wants to go the other way.

sprintf() may indeed work in this case, rather than printf, as it returns a string.