For clarity let's assume that macros stands for General-purpose macro processors (not VBA, vimscript, Lua). And also that it is being used to generate text code for a language that has functions - which we will call as the "main" language.
In the cited example, both C and the M4 are Turing Complete (M4 does have its own flavor of recursion, as stated in the docs which is important to achieve Turing completeness). By being Turing Complete, you can do with a M4 macro any computation that a C function would do. You could theorically process the pixels of a fractal in M4, compute 3d images in M4 or mine bitcoins in M4.
You for example decide to implement a sudoku puzzle solver in M4 (or in any other Turing Complete "macro" language). It takes a text input representation of the puzzle and then output the solution. It would be possible to do it only with the macro langague, without any external language. Being possible does not mean being easy, you would probably suffer with (1) weaker syntax and (2) ausence of tooling.
(1) Being Turing complete does not mean being practical. If the language has a weak syntax it will be hard to implement things that are easy on more featured syntaxes. In real scenarios, the "main" language will be more featured and so it will be easier to use it most of the time. (Your "main" language probably won't be BrainFuck!).
(2) You probably won't have many tooling at your disposal. Probably nobody will have implemented a type checker, a debugger and other tools for your "macro" or combination of languages (not counting GDB that would debug the whole pre-processor engine, here meaning a specific debugger for the macro language).
So responding to the question: "What can a function do that a macro cannot? For example, if I went through a large program and tried to remove all functions and use macros instead, what types of things would I not be able to do?"
Answer - It depends on which "main" and "macro" languages are being used. Probably the "main" language will be Turing complete and more featured than "macro", which itself calls for avoiding "macro", but if "macro" if Turing complete you would theorically do any computation doable in "main", providing it necessary IO access, as said on the sudoku solver example (where in fact the "macro" language assumes the role of a "main").
[edited answer]