If you are using canned pineapple slices, drain them and squeeze out any excess water or juice by hand. Blend the canned pineapple until mushy, about 10 seconds. If you are using fresh pineapple, remove the skin, cut it into pieces, and blend for 10 seconds.
Transfer the blended pineapple to a deep non-stick pan. Add sugar and cloves, and stir well. Cook over medium to low heat until most of the liquid evaporates and the pineapple jam turns golden. Stir constantly with a wooden spoon to prevent burning. Taste and adjust the sweetness by adding more sugar if needed. Remove and discard the cloves, then let the jam cool in the fridge.
Sift the flour, cornstarch, salt, and sugar into a large bowl or container. Soften the butter to room temperature. Combine the flour mixture, butter, and egg yolks, and knead until a dough forms. The dough is ready when it no longer sticks to your hands. If the dough is too crumbly or dry, add a little more butter (about 1 tablespoon) until it becomes easy to work with.
Divide the dough and pineapple jam (filling) into 30 equal portions each. Flatten the pastry dough with your palms, place the pineapple filling in the center, and use the dough to cover the filling. Roll it up with your palms to form a shape about 1 1/2 inches (3.5 cm) long.
Use a small paring knife to create criss-cross patterns on the tart, then brush it with egg wash using a small pastry brush. Place the pineapple tarts on a tray lined with parchment paper, ensuring they are spaced at least 1 inch (2.5 cm) apart.
Preheat the oven to 350°F (180°C) and bake for 20-25 minutes, or until the tarts are golden brown.