Good question. This is generally used internally, but it can be called externally with the right work. Usually, fields are set up that have the field type "deposit", so things like, ("deposit", "all_density") would be a density deposition of the "all" particle type. This should still work for FLASH datasets. But, if you want to set it up yourself, you can take a look at how it's done in yt/fields/particle_fields.py in the particle_deposition_functions function, which accepts a particle type, the name of the coordinates for that particle type, the name of the mass field for that particle type, and the field registry (ds.field_info) to insert the fields into.
Let us know if that helps!