In a large sauce pan combine sugar, milk, 1 cup of the coconut milk and the shredded coconut. Heat until steaming, stirring until the sugar is dissolved and remove from heat. Let steep one hour.
Place the remaining coconut milk in a large bowl and keep chilled. Have the egg yolks in another bowl next to the stove top with a whisk close by.
After the milk and sugar mixture has steeped for one hour, strain out all the shredded coconut and return to the pan. Heat again until steaming and hot. Whisk the egg yolks and slowly pour in ½ cup of the milk mixture at a time to slowly heat the yolks, keep adding milk while whisking until the yolks are warm and then add the yolks into the saucepan, scraping the sides of the bowl. With a spatula, constantly stir the mixture over medium low heat until thickened and it coats the back of the spatula, being careful not to scramble the yolk, about 10 minutes. Once its thickened, strain into the bowl of the remaining chilled coconut milk to catch any bits of egg yolk that might have over cooked.
Stir the mixture well and add in the extract and paste. Add in the optional coconut rum and stir again.
Chill completely at least 6 hours up to overnight. Churn using an ice cream maker following the manufacturers directions
Start layering the ice cream in a freezer safe gallon size container with the curd. Add about ¼ of the ice cream and ½ cup curd, swirling with a knife or spoon and repeat until all the ice cream is added and there is one last layer of curd swirled in on the top. Freeze at least 4-6 hours before serving. There will be leftover curd.