How is arbitrary shift function in digital circuits implemented in digital hardware?
There is no reason to assume that the shift happens in one clock cycle, but it is possible to do it in one or at least in a fixed amount of cycles depending on the implementation.
Shifting can be done quickly by implementing a barrel shifter. A textbook barrel shifter that can shift 64 data bits by any 6-bit count between 0 to 63 would only require 64*6 multiplexors. So for each data bit, it would only have a stack of six instances of 2-to-1 muxes.
First there would be 64 multiplexers to either shift by 1 position or not shift at all. The next 64 muxes would shift by 2 or not shift, and so on.
Yes, it may limit the speed, and various techniques exist to improve the textbook implementation.