Some people believe there is no replacement for displacement, but there's a lot more to an engine than its size. I like the 5.0/302 dimensions better: it has the same bore as the 5.8/351, but a shorter stroke, so it can rev up faster. The real key to making big power is air flow in and out of the engine. If you stick a 351 in Mustang, you'll be limiting yourself to a smaller pool of exhaust manifolds that are available. You won't have this problem if you're putting the engine in a truck, or doing a Mustang-II IFS conversion. One of the advantages of multi-port EFI is that each cylinder gets the proper amount of fuel, so you don't have one cylinder running excessively rich in order to prevent another cylinder from running excessively lean. Also, you'll definitely want to use a roller cam, and if you're planning on using a 1984 or earlier block, you can have that modified to accept a roller cam. Gear ratios have a big effect on the performance of a car too.
Nearly all pistons, with the exception of antique cars, are made of aluminum. The difference is how they're formed. Forged pistons are formed under pressure, and result in a stronger structure than cast pistons. The question you have is "can cast pistons support up to 400 hp?" You'll have to ask an experienced engine builder, enthusiast/racer, or the manufacturer. The shape of the piston will depend on the type of cylinder head you're using.
You also wondered how many horses can you gain by boring the cylinders larger. That's impossible to answer because I don't know what you're starting with, but I am sure that increasing the bore won't gain you much if airflow is still restricted through the intake or exhaust system. Boring out the cylinders might even have a negative effect, because now you're trying to more more air through the same size intake/exhaust ports. You're more likely to make much bigger gains by improving airflow rather than displacement.