For figures and tables - or, in fact, any object that requests them - generate numbered labels. Set the contents of the label and the contents of any cross-references to the labelled object.