You can use Object._validate_property() to modify programmatically how the property will behave in the inspector.
For example (assuming your ItemDB resource exports an array of strings):
@tool
class_name Inventory extends Resource
@export var items:Array
func _validate_property(property: Dictionary) -> void:
if property.name == "items":
# Load the item db
var item_db = preload("res://item_db.tres")
# Join the items array by comma
var items = ",".join(item_db.items)
# Create the hint string <type>/<hint>:<hint_string>
property.hint_string = "%d/%d:%s" % [TYPE_INT, PROPERTY_HINT_ENUM, items]
Will show:
The values will be saved as an array of ints. In this case the indices of the entries of the ItemDB.items array.