How would you get a particle's type with its index? ex: watr = liquid, sawd = powder
There is no real short way to do that, as I know. You could make a table with all possible liquids, then one with powders and then search through these tables and if it finds something, it's the type of the table.
https://powdertoy.co.uk/Wiki/W/Lua_API:Elements.html#elements.property