Magnets could probably be like black hole, attracting certain particles to it, not changing pressure, and attracting particles. It might be a case of adding some code to the particles that will be attracted, and as for the magnet itself, conducting like metal, not absorbing and when those particles touch it, and will NOT be affected be gravity (Cracker64 probably has the code in his mod, in the GRAV material witch is unaffected by gravity) so the code for it is already there. I'm not a coder or anything, but I do understand that code is what makes it happen in an application.
I'm sure it's possible to make magnets but making them ignore environmental gravity (which is one-directional), or even pressure and velocity in favor of being able to attract to one another isn't likely to help.
The issue more with making functioning magnets is figuring out how to emulate the effect without just adding a whole new grid to the game on top of heat, pressure, X and Y velocity, and Life. @_@ The fact that Powder Toy is always doing lots of work as it is makes it difficult to cram in CPU-intensive activities like this.
If someone figures out a way to do it without making a whole new matrix variable for it then it'd probably work without a hitch, the same as one-way walls and Portal elements have been proven so far (Both of which exist and work perfectly fine now.)