Implement apply target types.

Fixes #5924
Update the auto-discovery scripts.

Refs #5855