The painter who was at the heart of the New York avant-garde captured the many excitements of the modern age