Lewis Hamilton endured a challenging weekend at the Sao Paulo Grand Prix, finishing ninth from 20th on the grid as Ferrari struggled and Mercedes claimed the constructors' crown.