How does wing shape impact shock structure?
Is the shock seen in the side view (airfoil shock structure) related to the one seen in the top view?

No, not at all. The first picture (side view airfoil) shows an unswept wing in supersonic flow and is not very precise. The shock angles of the LE shock and the TE shock should be identical.
The second picture (top view wing) shows a swept wing at bit above the speed of sound (almost half the speed in the first picture). Here, the flow pattern around the airfoil is fully subsonic (that's why the wing is swept!) and only its most forward tip will cause a shock which is almost straight because flow speed is only a bit higher than the speed of sound.

How would the shock structure change if the airfoil is kept the same but the wing is swept more? (If you can show some 3D plots for the shock structure, it would really be helpful!)

That depends on the ratio between speed and sweep angle. As long as the sweep angle exceeds the shock angle, flow around the airfoil behaves like in the  subsonic case with a stagnation line, flow around the round leading edge and no bow shock or expansion fans. When the shock angle is greater, the airfoil will show a flow pattern like in the top picture. Sorry, no fancy 3D plots!

Can you explain what determines the shock angles in this picture (is it sweep or airfoil shape or both - and which is more dominant)?

The first and foremost factor for the shock angle is speed. Mach 1 will cause a straight shock and higher speeds will bend the shock backwards into an oblique shock with a shock angle $\varphi$ according to the equation $$\varphi = arccos\left(\frac{1}{Ma}\right)$$
This angle will become smaller with increasing bluntness of the body causing it.

Shock angle diagram (from Wikipedia, source). The caption is: This chart shows the oblique shock angle, β, as a function of the corner angle, θ, for a few constant M1 lines. The red line separates the strong and weak solutions. The blue line represents the point when the downstream Mach number becomes sonic. The chart […] is valid for an ideal diatomic gas.
Explanation: M1 = Mach number ahead of the shock, M2 = Mach number past the shock. β is the half cone angle such that β + $\varphi$ = 90°.
Consequently, the angle of the shocks emanating from that T-38 show that it flies at around Mach 1.09. In Schlieren images like this darker areas indicate higher density and lighter ones lower density. The two dark lines coming from the fuselage tip and engine exhausts are the two compression shocks which are audible as a double boom when a supersonic aircraft passes overhead.