Some futures (most currencies, indices) expire on the 3rd Friday of the month. Are there similar rules for other futures like commodities, metals, energies, etc.?
I'm more familiar with the commodities side of this question, but i would hazard a guess that it's similar across all the asset classes. The answer is Yes, there are rules that govern the expiry of the contracts.
The safest way to find the expiry details is just to look them up for the contract you care about, for example the ICE Brent crude oil contract expiries can be found here - on a page maintained by the exchange. In commodities, the expiries are different for different commodities (though generally speaking they are in the second half on each month).
You can see that the Dalian Egg Contract does have some pretty simple rules for the dates:
But you'll then have to maintain a calndar for the Dalian exchange. Exchanges are aware of this kind of things though of course, and will publish their trading calendar. Again, here is the Dalian calendar. Note the message at the bottom of the page:
This schedule is subject to change, and members should inform their clients of DCE’s market holiday arrangements in a timely manner. DISCLAIMER: The content of this English website is mainly translated by a third-party company. DCE has neither approved nor endorsed this English language version as an equivalent of the simplified Chinese character version. DCE and/or its subsidiaries accept no liability for any loss or damage, and make no warranty, guarantee, undertaking or representation in relation to the accuracy, reliability, availability or completeness of the content of this English website.
Sadly, the exchanges also sometimes change their mind - see here, where ICE decided to change the dates related to the contracts.
And then it actually gets a little more complicated, commodity futures can be physically delivered. So now we have the concept of notice. The future may have a last trade date, an expiry, a first notice date, and a last notice date. If you hold the contract past the first notice date, then someone who is short the contract can choose to deliver (is is normally the short party with the option to decide when they deliver). When this happens they notify the exchange, who will then pick a member who is long the contract (where they pick using some logic according to the contract spec, normally randomly) and notify them that they are taking delivery.
Sometimes this first notice date is before the last trade date, other times it is not. If you're part of an entity that cannot take physical delivery, then as far as you're concerned the last trade date is the earlier of the two dates.
Different exchanges can have different rules though, and even within one exhchange different commodities can have different rules, be it because of legacy reasons, tradition, or just something related to the specific commodity (i.e. logistics of delivering 1000 barrels of oil, etc)
Hope that helps.