You may need to wait and measure for the correct driveshaft length in case there are unforeseen variables. Driveshaft length will depend on what length tailhousing you are using AND what yoke is on the 9" rear. The correct Mustang toploader for a 351 uses a tailshaft that is 14" in length and a 28 spline output shaft. All cases are 10" so that is not a problem (unless you found an early 64 narrow case which is also 10" but will not bolt to the back of your 351 using a stock bell housing.)
The 28 spline output shaft use the same splined yoke as a C4 Automatic. The 31 spline output shaft uses the same splined yoke as the C6. In either case, you need to know what type of U joint you want to use (1310, 1330, or 1350) with the driveshaft. The higher the #, the stronger the joint and you should use at least a 1330 style with a toploader. You must match the joint to what the yoke and driveshaft was originally built for although it is possible to match up different combinations, such as using a 1330 yoke on a 1310 driveshaft (or vice versa) through special conversion U joints.