I think a discussion about programming being an art is incomplete without bringing into scope live coding, where you write code that produces music in front of an audience; Processing, a programming language for artists; and literate programming, where you intertwine prose and code to form a coherent narrative or story.
Many people here are talking about programming as a tool you use to solve problems and build systems, but that’s just the subset of programming tasks corporations pay you to do. Programming is for many other things and it can be as expressive or constrained as you like.