Don't get those thick foam mats from Harbor Freight or Home Depot. When you heat them for shaping, they emit a toxic gas.
You should check out Kamui Cosplay . She has a lot of references and advise.
As for where to buy foam.. Amazon is going to give you the best prices.
Here is a link to some EVA Foam .