I want to provide author-usable macros in my package to store data that will later appear in a table, but it would be nice to allow authors to define the data in that table at any time, even after the table is created and rendered.
Can I store data at any point in the document, and still retrieve all of it at any location? Another way to ask this is: Is there some form of deferred processing such that I can do this (somewhat pseudo-code):
\adddata{some data}
\adddata{more data}
\maketable
\adddata{even more data}
\adddata{additional data}
such that the table, with all data (not just those stored via calls to \adddata prior to calling \maketable), will correctly contain all of those data, regardless of where in the document \maketable was called?
I know this is partially possible with clever use of command renewal and such, but once TeX finds and renders the table, isn't it too late to change its contents? I should clarify again that the table must appear in the document where \maketable is called.
Note: Assume that \adddata and \maketable are defined in a class or package that handles all of the internals of storing the data and formatting them in the table.

.auxfile. But some more information about\adddataand\maketableis needed. – egreg Oct 22 '15 at 22:17