Disclaimer: I'm not an expert in GPUs and shaders; and I've used OpenGL/WebGL/GLSL rather than Direct3D/HLSL. So I'm only answering this question because no one else has. :-)
Regarding pointers: I'm pretty sure you can't use pointers within the GPU, since data that you send to the GPU would have unpredictable addresses (locations) in GPU memory.
But regarding dynamic data structures (variable number of dimensions), it seems like you could do this by just varying the "size" parameter passed to vertexAttribPointer()
or the equivalent. You pass in a flat array containing all your vertex coordinates, with n coordinates per vertex; and use the size parameter to tell the shader what n is.
Then in the vertex shader, you can project the data from n dimensions to 3, using a projection matrix that you construct in the shader from parameters passed in.
I think similarly, in the fragment (pixel) shader, you can the project the data from 3 dimensions to 2, using a view matrix that you construct in the shader from parameters passed in.
Hopefully this will get you started, so you can get to the point of asking more specific questions. To be honest, I've not found SO to be as productive a place for getting questions answered about graphics, as it is for some other topics, like Python. You might have better luck asking on a web site specific to Direct3D.