The rear ones are gonna be different
but yes the fronts are the same except usually fwd subies have larger shafts than awd subies. They'll interchange just fine as will Imprezas, legacies and xt6s as far as spline count goes. Only variation I know of is the 93-94.5 Impreza manual fwds had a 23 spline count not a 25.