1. In a large pot, combine meats, half the onion, half the garlic, bay leaves, thyme, and salt. Add water to cover by about 4 inches. Bring to a boil and let boil for 3 to 5 minutes. Lower heat to maintain a simmer and cook until meat is falling off the bone and shoulder is tender, about 3 hours. Skim the surface throughout the cooking process and add water as needed to keep the pork covered. Once pork is done, strain the cooking liquid and discard aromatics, reserving broth. Shred meat and discard bones; set aside.
2. Meanwhile, in another pot, cover dry corn with water by 2 inches. Simmer until corn is plump, about 1 hour.
3. Remove stems and seeds from chiles. Gently toast over an open flame (or using oven broiler). Add to a pot with remaining garlic and onion and cover with ½ cup water. Simmer for 15 minutes, then set aside to cool. Once cooled, process with an immersion blender or transfer to a blender to puree.
4. In a large pot, fry the chile puree until aromatic and orange in color. Add corn and pork broth and simmer for 20 minutes. Add pork meat and simmer for another 15 minutes. Serve garnished with cilantro, chopped onion, and lime wedges.