Hi! I'm developing a 3D scene arrangement tool in C# and I want to
implement a feature for users where you can select objects behind other
objects. I've searched the web for examples on how to get all of the
meshes gathered from a pick ray (instead of only the nearest) but I
haven't found any references on how to get or store that information.
Are there any resources for this that I might have missed If not, may
I get some advice or (bless your heart) some sample code Thank you in
advance!

Pick-Through Multiple Selection
Sigfuss
R. F. Phillips
If you do create/find an algorithm that stores all intermediary intersection points be careful of back-facing triangles and complex meshes... The ray may enter (front face) and exit (back face) multiple times, thus you could generate multiple intersection points for a single mesh. Not strictly a problem, but if you specifically want the second/third/fourth mesh behind the front one you need to be careful - just taking the 2nd/3rd/4th intersection points may well still be the same mesh...
hth
Jack
DavidP
A picking algorithm needs to convert a 2D mouse (or whatever) coordinate into a 3D ray, simple mathematics states that a single 2D point generates an infinite number of 3D points (along the corresponding ray).
The two types of algorithm you'll tend to find either traverse the ray from the screen (usually t=0) towards the back plane (usually t=1) and check for intersection along the way. The function finishes as soon as it hits something - as its also the closest. The other method (which is more robust) is to perform intersection tests on all possible objects (ideally in a hierarchical fashion) and then find the intersection with the lowest value of 't' - implying its the closest to the screen.
You probably want to find an implementation of the latter type - an intermediary step should contain most (if not all) objects that the ray intersects along with the corresponding distances. You then need to tweak the code such that it returns the 2nd/3rd/4th (etc..) intersection instead of the first/front.
I know you mention C#, but in C++ there is the D3DXIntersect() and D3DXIntersectTri() methods - both will do the hard work for you as well as return the distance (what I've referred to as 't'). I assume there are MDX/C# alternatives to these functions.
Getting D3DX to do the hard work just means you need to gather the results in an array/container, sort them and then pick which one you want....
hth
Jack
SADave