Regarding rice and some other carbs, this is called resistant starch.
More is explained here: https://www.healthline.com/nutrition/9-foods-high-in-resistant-starch#9-Other-cooked-and-cooled-starchy-carbs
THANKS!