I think it is possible but that would require a really strong magnet and the magnet would have to be arranged in this manner. The iron filings will have to form a loop and support themselves in mid-air. This is because the filings adjacent to each filing are acting as tiny ferromagnetic materials and holding them up.
For some reason I think the horizontal magnet setup ($1$st image) may not work as that would require an even stronger magnetic field because that way the direction of field lines on the sides of the magnets will be nearly perpendicular to the direction of the weight of the filings.
This will strain the setup and as a result the arrangement will be very prone to instability.
One more thing should be noted that simply increasing the strength of the magnet will help us so long as the iron filings don't reach saturation magnetization. After that increasing the strength of the magnet will have little to no effect.
