Wow - you will need a big pan to cook all that macaroni!
It could be easier to prepare the pasta in batches, about 4 trays should cover for 40 people.
To give you an idea - 8 ounces of uncooked pasta will have a volume of around 4 cups once cooked. 2 ounces per person is standard but remember you can always bulk out the macaroni salad with some healthy greens, salad leaves and potatoes!
What could be more perfect than a picnic, good luck :)