Is there any way to group variables like group.variable as you can in Java/Delphi
What you are looking for is a struct:

struct foo {
    uint8_t Ux;
    uint8_t Uy;
    uint8_t Yz;
};


Then:

struct foo A;
struct foo B;


And:

A.Ux = 3;
B.Uz = 48;

int c = A.Ux + B.Uz;


When calling a function you should really use either pass-as-pointer or pass-as-reference to avoid unnecessary copying:

// By Reference
int normal(struct foo &amp;arg) {
    return (arg.Ux + arg.Uy + arg.Uz) / 3;
}

int avg = normal(A);


Or:

// By pointer
int normal(struct foo *arg) {
    return (arg-&gt;Ux + arg-&gt;Uy + arg-&gt;Uz) / 3;
}

int avg = normal(&amp;A);


You can read more about structs here.