We all know that aluminium foil is far cheaper than heatsink. In some cases aluminium foil works like a heatsink. So I want to use aluminium foil instead of heatsinks
Bad idea.. The lateral heat spreading into 0.1mm foil will be 20x less than into 2mm Al plate, so save up and buy the plate if you have anything above 100mW to keep cool.
Is it possible? Get a handbook of materials, look up the thermal conductivity, look up handbooks of heat transfer, and you should be able to confirm that a 2mm square of 0.1mm foil will help with loads in the 1mW to 20mW range but be insufficient for anything much bigger.