You can patent an algorithm. This has been accepted in lots of patent offices. The algorithm can consist only of mathematical and logical operations, as long as the purpose of these operations is an invention otherwise deserving of patent protection. A program, also, is composed of mathematical and logical operations. I think I was clear what I was talking about earlier--you can't patent the bytes of code implementing the algorithm (you can copyright that, which in some ways gives you more power), but you can patent what it's going to do. Thus, a program can be patented in that you can be forbidden from implementing the behavior it does.
Now let's look at your suggestions for why an AI program can't be used to make a patentable thing. I should reiterate that this isn't about making the program the inventor, which is wrong.
"All current AI systems work basically the same way, and so the method (give data to this program, which has been constructed by a statistical inference method) is known."
All compression systems work basically the same way , and so the method (give data to this program, which will find patterns and either change the size of chunks or eliminate unimportant ones) is known. Yet you can patent specific ways of doing this and many have. Thus, if you can find a new way of automatically analyzing data, it could be patented. You admitted this yourself. Thus, if you invent a new method of analyzing data and use it to create something, you've invented something others could not. The result would be a product of your ingenuity and eligible for a patent.
But what if you're using someone else's model? You covered that too:
"But once you've got the machine, you give it some data, it churns a lot, and out comes whatever. You haven't contributed anything, except the data, and the program was constructed using known methods."
You contributed the data, whatever that might be. You probably also contributed a lot of code around the statistics. Most machine learning libraries, often what people mean when they say AI (unless they're the kind of marketing people who think an if statement counts) don't come with lots of friendly "Drop your data here and let's see what we get" boxes. Parsing data into a usable form for analysis and making the result obtain a goal takes effort. That effort requires ingenuity. If the ingenuity and effort are used to create something that didn't already exist, you've got an invention.
Moreover, when the result of such a program is an invention, the data itself is probably evidence of ingenuity. I'll use a concrete example for this: you're going to design new safety equipment for better outcomes for passengers in a car crash. One method to do this is to design some options, build prototypes, get some cars and test mannequins, and start crashing. If you get a good product by doing this, it would clearly be patent-worthy. Now that we have the computing power, you might also use computers to simulate designs and their results and evolve options. Both cases could use AI, probably neural nets: one to determine and improve simulation accuracy from the real-world tests and one to check the results of the designs and figure out where to make changes to improve it. If you did this, and also produced a good product, should it not be patent-worthy? After all, if I ran the same program in the same way, I could have gotten that product. However, had I designed them manually and done manual testing, I could also have made the product. The patent is given when you choose to use your skills to produce an invention, and you did. That someone else could have is not part of the process unless they also literally did so.