Rinse the rice through a sieve under cold, running water for a full minute. Drain the rice.
Heat the oil in a medium pot or a deep skillet over medium heat. When the oil is hot, add the onion. Cook the onion, stirring frequently, for 7 minutes, or until it's soft and just browning. Add splashes of water as needed to prevent sticking. When the onion is ready, stir in the garlic and cook for 1-2 minutes, or until fragrant, stirring constantly.
Add the rice, turmeric, cumin, coriander, salt, bay leaf, and water to the pot. Bring to a boil, reduce heat to low, and cover. Simmer for 12-15 minutes (for white rice) or for 30-35 minutes (brown rice), or until the rice is tender.
Pour in the extra 1/2 cup water, then add the spinach to the pot, piling it over the rice. Cover the pot again to allow the spinach to steam and wilt down for 2 minutes. Then, stir the spinach into the rice, so that it wilts down completely. (If you need to add a few splashes of additional water as you do this, go for it.)
Finally, stir in the kidney beans, lime juice, and black pepper to your liking. Taste the rice, adjust seasonings as needed, then stir in the cilantro, if using. Top with yum sauce or any other desired garnishes. Serve.