You can only return once from a function.
You could add each datablock to a string but this has been deemed slow by Badspot.
First, you're putting things together into a string, sending a copy of that string back from a function, then taking the string apart to get the objects again. That is a lot of useless string operations that are slow.
You could just include that small part of code each time you use it, because the loop to go through a global array would be almost as big itself.