ball joint maybe? with the wheel off the ground grab the top and bottom of the tire and try to move it back and forth if it moves and clunks thats probably the problem.
Car batteries these days seem to only last about 3-4 years. You may be showing good voltage but amperage is also important. Autozone can load test the battery (free) to see what amperage you are at.
Most people here have been getting their replacement batteries at Costco for around $80 or so.
junkyard or new cover on ebay for around $70 shipped
https://www.ebay.com/itm/US-Retractable-Rear-Trunk-Cargo-Luggage-Cover-Shade-Visor-For-2013-16-Mazda-CX-5/392471567572?fits=Model%3ACX-5&hash=item5b6120dcd4:g:RzgAAOSwSKJdnYux
Try doing the power window reset. Open window all the way down and hold down for 5 seconds, then immediately raise window until closed and hold for another 5 seconds.
Was the boiling in the coolant reservoir tank? I don't think that is normal I would visit the dealer and get it checked out since this is a brand new vehicle and under warranty.
The p0304 code is cylinder 4 misfire. Since you said you replaced the coils, wires and plugs it might be a dirty or faulty fuel injector on cylinder 4.
The p0102 is the mafs, since you said you cleaned it and it didnt help you probably need to replace it.