Is there any pattern or standard to through-hole resistor sizes?

Standard Through Hole Resistors are very commonly, though unfortunately not absolutely always, referred to in the size domain by their DIN-size. Almost all manufacturers still make them in the standard sizes, but not all of them refer to that DIN size any more in datasheets or product numbering, as they used to.

This is a four character number. The most common of these are 0102, 0204, 0207, 0309, 0411, 0414, 0617 and 0817. (although the numbers do go higher). Sometimes these are prefixed with DIN-****. As stated size no longer really equals power, as there are different ways of building up the resistive film that will damage at any temperature between 75 and 200 degrees Celsius, where each build-up can be equipped with advantages and disadvantages in other domains.

If you want to implement DIN compatible size numbering I'm sure someone somewhere on Google has scanned an old book about the regimen of sizing using DIN numbers. They have become so normal/standard to me, that I hardly remember the meaning of the numbers. Probably something to do with those silly inches. ;-).