create_targets function

Helper function for creating targets from auxiliary information and formula