The Dow and S&P 500 end higher Friday, as investors pore over fresh economic data on inflation and a $1 trillion infrastructure package, credited with helping to lift broader markets to all-time highs.