can you max EV train (510 EVs) and then use Carbos, Protein, Iron etc. to get extra boost
No. The Carbos, Protein, etc, are included within the 510 EVs. A maximum of 10 can be used per EV booster. So you can receive 100 max Attack EVs from Protein, and you must get the rest yourself.