Twistor transform in d dimensions and a unifying role for twistors