Prepare the Flavor Base: Heat the olive oil or achiote oil in a medium, heavy-bottomed saucepan over medium heat. If using ham or salt pork, add it to the pot and cook until lightly browned and rendered, about 3-5 minutes. Remove the ham/pork with a slotted spoon and set aside, leaving the rendered fat in the pot.
Sauté Aromatics: Add the sofrito to the pot and cook, stirring frequently, until fragrant, about 2 minutes. Stir in the minced garlic, oregano, cumin, and black pepper, cooking for another minute until fragrant.
Incorporate Color and Peas: Stir in the Sazón packet until well combined. Add the drained and rinsed pigeon peas and the reserved ham/pork (if used). Cook for 1-2 minutes, stirring to coat everything evenly.
Add Rice and Liquids: Add the rinsed rice to the pot and stir well to coat each grain with the flavorful mixture. Stir in the chicken broth (or water), tomato paste (or sauce), and bring the mixture to a rolling boil.
Simmer to Perfection: Once boiling, reduce the heat to low, cover the saucepan tightly with a lid, and let it simmer undisturbed for about 20-25 minutes, or until the liquid is absorbed and the rice is tender. Avoid lifting the lid during this time.
Rest and Fluff: Once the rice is cooked, remove the saucepan from the heat and let it stand, covered, for another 5-10 minutes. This allows the steam to finish cooking the rice evenly. Finally, fluff the arroz con gandules gently with a fork before serving.