Generally, PV modules in a string must be oriented in the same direction and also ideally not have widely different shading probabilities, although the bypass diodes can help some with shading issues. Optimizers in a string can generally be installed with their associated sets of module in different orientations and with widely different shading probabilities. Strings of either can generally be connected in parallel without any issues. This is the reason optimizers exist, they prevent the wide current operating range of modules in different orientations from impacting each other and different shading scenarios from effecting each other. so don't mix an east facing module with a west facing module behind the same optimizer and you will be fine.