If you were a farmer in Arizona or California or Mississippi, taking part in federal farm-support programs, 1982 was a bumper year for harvesting government gold.

The average Arizona farmer collected $27,040 in federal subsidies, his counterpart in California received $15,690 and the Mississippian $11,100, according to a new study of the nearly $2 billion handed out by Uncle Sam in 1982.

The data, from an abstract of a forthcoming Senate Budget Committee publication, were compiled as a prelude to congressional debate over a 1985 farm bill -- a debate that is expected to be long and contentious.

To no one's surprise, and not unlike several studies of earlier programs, the new review found that a handful of the largest farmers received disproportionate shares of the benefits. But it also found startling disparities between different crops and regions of the country.

Some examples:

*While the average participating corn farmer received $1,333 in federal payments, the average rice producer received $11,238 and the average cotton farmer received $7,767.

*Although the average payment to all farmers was a seemingly modest $3,297, there was great divergence among the states. At the bottom of the scale, Maine farmers received $228 each, while their Arizona brethren collected more than 100 times as much apiece.

*Although the programs studied -- farm disaster aid and target-price subsidies -- were national in scope, farmers in the state of Texas received slightly more than one-fourth of all the money spent by the Department of Agriculture.

*Overall, 17 percent of the farmers, those operating on 500 acres or more, received 60 percent of the largesse. This 17 percent also accounted for 60 percent of the production counted in the programs.

The authors of the report also found that since 1978, the last year the government programs were reviewed closely, the "larger farms are reaping larger program benefits than before . . . . If Congress desires to provide greater income assistance to the smaller producers a different mechanism for determining payments would have to be devised."

The abstract was presented to the American Agricultural Economics Association last month by Randall A. Kramer, an associate professor at Virginia Polytechnic Institute, who did the longer paper with committee analyst G. William Hoagland and Patrick H. Gardner, an intern.

Kramer and Hoagland said in interviews last week that their study was not intended to address another key element in the debate over farm support programs -- whether those who get the most assistance actually need it.

But, Kramer said, "The issue of distribution of benefits is always interesting, especially with a new farm bill coming on. The distribution by size is well known. Things are basically the same. But with cotton and rice getting more of the benefits, there may be implications on what kind of unity we see in the farm bloc when congressional debate begins."

Farm groups and farm-state legislators are openly worrying about public reaction to the soaring costs. Federal farm programs cost a record high of nearly $20 billion in fiscal 1983; last year the government gave farmers about $9 billion worth of surplus grain in return for not planting.

"The very high level of current farm program spending lends urgency to the task of determining the incidence of program benefits as Congress begins deliberations on a new farm bill," the Kramer-Hoagland abstract said.

Their study, compiled from USDA payment and planting records, dealt with two main components of farm programs that provide direct subsidies to growers. One is disaster aid, available generally in areas with no federal crop insurance. The other is the "deficiency payment," a direct subsidy calculated by a complex formula linked to market prices and production costs.

The analysis covered wheat, corn, barley, sorghum, oats, cotton and rice. For the 1982 crop year, USDA spent $1.7 billion on deficiency payments to 552,438 farmers and $118 million on disaster aid for crop losses due to bad weather.

Because the federal supports are keyed to production volume rather than to an individual farmer's need for income protection, those who produce most tend to benefit the most.

That becomes apparent in the wide gulf between farmers in Arizona and Maine. The principal supported crop in Arizona is cotton; Maine, a state known for potatoes and berries, produces little that is covered by the federal support schemes.

Among six regions of the country, the study found, the 11-state Northeast had the least farmer participation (6,193) and the lowest average payment to farmers ($1,122). Highest payments went to the Southwest, which included the huge cotton areas of California and Arizona, where 13,002 farmers averaged $12,504 in aid.

The largest outlays, however, went to the nine grain-producing plains states, where 289,448 farmers divvied up $949 million for an average of $3,279 apiece. Other averages by region: Northwest, $4,279; north central (Midwest), $1,605; South, $5,476.

From another angle, the study found that average payments to farmers with less than 70 acres was $488, while farmers tilling 2,500 or more acres of cropland received an average of $27,204 in the direct payments.

Federal law limits deficiency payments to $50,000 per farmer, while disaster payments cannot exceed $100,000.