Orbital and superorbital periods in ULX pulsars, disc-fed HMXBs, Be/X-ray binaries, and double-periodic variables