Creating a "filtered" UI field
For anyone having the same issue, it's as simple as using prop_search() instead of prop() in the draw code.

Example:

row.prop_search(bpy.context.scene, "your_string_prop", bpy.data, "armatures")


to create a filtered field for the armatures in your current scene.