Hacker mindset
I would agree that hacking is an extremely creative activity. The requires the person that is hacking to think about the system as a whole that they've never seen the code of generally and think as the person writing the code with think. And requires us to think of new things that people have never tried before. Even to think of things that the system could be used for that people never realized. I believe it takes a lot of creativity to realize that you can pass SQL into a URL to extract the entire database on to a web page without ever seeing the code before although that's old news now.
This mindset reminds me a lot of the movie divergent where the main character has to think of ways to look past the obvious solutions and question the assumptions imposed by the tests such as the glass wall being impenetrable. Divergent thinking requires us to think in terms of third alternatives when only an two options are presented. While often these skills are used for crimes to be committed they're the same skills that are often used the question our assumptions about the world and find new alternatives to problems that we thought we would never solve. This is even the exact same mindset we use when we are debugging code. So much so there's even a book written called your code as a crime scene. It's the mindset of a detective that we all adored about Sherlock Holmes.
I also have to agree that science is a very creative act. In fact the Socrates method of questioning involved questioning other people's assumptions and challenging the way people thought about things (which people like just about as much as being hacked.) This method was a precursor to the scientific method.
Links: