Array with User-Defined Function

Working example, best if done as a sketch and a header file as follows.

/* ==============================================================================
 * File - types.h
 * ------------------------------------------------------------------------------
 */

/* ==============================================================================
 * ------------------------------------------------------------------------------
 */

struct point_t
{
    short x, y;
};
/* ==============================================================================
 * File - test_sketch.pde
 * ------------------------------------------------------------------------------
 */

/* ==============================================================================
 * ------------------------------------------------------------------------------
 */

#include "types.h"

/* ==============================================================================
 * ------------------------------------------------------------------------------
 */

point_t funct1()
{
    point_t pt = { 4, 12 };

    return pt;
}

void loop()
{}

void setup()
{
    point_t pt  = funct1();
    short   x   = pt.x;
    short   y   = pt.y;
}