To prepare caramelized onions, melt butter in medium saucepan over medium heat. Add onions, salt, pepper and sugar and cook, stirring occasionally, until golden brown, about 20 minutes.
To prepare tarts, combine half-and-half, whole eggs, egg yolks, cornstarch, nutmeg, thyme, salt and hot sauce. Whisk vigorously until well blended. Pour into muffin cups.
Evenly divide caramelized onions and cheese among tarts. Evenly divide the custard among tarts.
Bake 30 minutes, or until a wooden pick inserted in the center comes out clean. Remove from oven, cool briefly, then serve. You may also refrigerate tarts for up to 4 days or freeze for up to 60 days. Be sure to cool tarts to room temperature before freezing. Makes 12 (2-inch) tarts.