No, you can’t access the elements like an array because float2 and float4 are structs.
Both look fine. Can you post the exact error message?
Are you talking about device or global functions? For device functions, you can do it the same way you normally would: pass several parameters by reference. For global functions, you can’t return anything (even single values) and you can’t pass arguments by reference (as far as I know), so usually what you do is: allocate some memory on the device, pass it as a pointer to the global function, it writes the output to the to the device memory via the provided pointer, and finally you memcpy the contents of of the memory back to the host.