Effects of finite superconducting coherence lengths and of phase gradients in topological SN and SNS junctions and rings