I'm creating a custom object that needs to be related to multiple other objects (but only one per record). I.e. via a ParentId field it could be related to a Opportunity, a Contact, an Account, or another custom object.
This would be pretty much the same as the Polymorphic Key Attachment.ParentId that can reference multiple other object types.
I can't do this via the UI as the lookup can only be related to a single type.

Is it possible to create a polymorphic reference through another means, such as the metadata api?
Failing that, are there any viable alternatives?
I'd like to use the lookup so I can show the related objects via the page layouts. This object will also be deployed as part of a managed package and clients may want to reference their own custom objects from it.