Well, I like to think that Pokémon are formed by a number of different things. Elements, Structures, Ideas, Concepts.. etc.
The fact that they're all "Pokémon" and can interact the way they do must be because there's a unifying element to them all which MAKES them Pokémon.
I propose the Pokérus theory. Pokérus is a microscopic life-form that helps Pokémon grow quicker, but could the Pokémon itself be an advanced form of Pokérus?
Perhaps through natural occurence, or more likely meteor bombardment, the Pokérus travelled to Earth from space, which then set about breeding and multiplying upon the Earth.
The microscopic life form then bound itself to various things, plants, people, animals, basically any living creature it could use as a host. This includes machines, too.
Given there's a psychic typing, then naturally some Pokérus sustained itself off psychic energy, which would naturally expose the Pokérus to human concepts and legends and ideas and whatever thought process that being may have had.
So these various influences, elemental, psychic and physical provided the "image" or basic template of Earth's Pokémon, forms best suited for the environment they were inhabiting.
The Pokérus then evolved either gradually or suddenly into these forms, and once given a name by a person, or group, the Unown (Who were created directly by Arceus to impart messages to humans) did their stuff and through a mass psychic field sort of hardcoded that name directly to the Pokémon. This process occured during the Arceus event in HG/SS. You see the Unown flying around during the birth of whichever Legend you pick, which incidentally is the only time we ever directly see a Pokémon egg being created, and certainly the Day Care people never see it despite the large amount of eggs being shuffled through every day.
Pokémon like the first Dialga, Palkia and Giratina, and Arceus were different, being formed from Pokérus in space.
Deoxys is a special case and I believe it to be evolved Pure Pokérus. It didn't take a form from anything and just kept evolving and evolving on it's own.
Ditto are "carrier" forms of loose unevolved Pokérus, combining together to survive instead of finding a physical/mental host. These Ditto are more than happy to adapt to the form of whatever Pokémon surrounds them, and use it as a survival technique for whatever environment they need to adapt to.
So really when I see Pokémon taking the form of Ice Cream, it's no different than it taking the form of anything else. How is Ice Cream more ridiculous than a Pokémon choosing Mr. Mime or Jynx as it's form?
Different influences create different creatures. Grimer was formed from toxic sludge for crying out loud. The first generation had a lot of weird stuff which people forget due to nostalgia goggles. Hitmonchan having fully formed gloves, clothes and belt with a "P" on it.
So nobody can say what a Pokémon SHOULD look like, and in universe I'd say the only criteria for a Pokémon even being a Pokémon is it's susceptibility to Pokéballs, ability to be converted into energy and stored in a PC, susceptibility to the microscopic form of Pokérus, and ability to control it's individual natural environment.