Q:

How can I get data from multiple form fields, and then submit them with the same form into a single database cell as a array?

This is part of my form in Rails: 
    # 2 fields that should have values passed into an array
    <%= f.label "test1" %>       
    <%= text_field_tag(:test1) %>
    <%= f.label "test2" %>
    <%= text_field_tag(:test2) %>

    # hidden field to (hopefully) receive the array data (same form)
    <%= f.hidden_field :subtypes, :value => @subtypes %>

This is in my controller:
  def update
    if @anomaly.update(anomaly_params)
     redirect_to anomaly_path(@anomaly)
     flash[:success] = "You have successfully updated the anomaly"
    else
     render :edit
     flash[:error] = @anomaly.errors.full_messages
    end
  end

This method will run before the various methods:  (before_action at the top of file)
# before_action :subtypes_array, only: [:new, :edit, :create, :update]

def subtypes_array
  @subtypes = []
  field1 = params[:test1]
  field2 = params[:test2]
  @subtypes << field1
  @subtypes << field2
end

I also have this in the controller:
# before_action :set_anomaly, only: [:show, :edit, :update, :destroy]
def set_anomaly
  @anomaly = Anomaly.find(params[:id])
end

I have Rails 4 strong params to allow the data from the various fields through.
The form works without errors, but the data from the two fields never makes it into the database.
I already have a database column that can receive an array with string values: 
class AddSubtypesToAnomalies < ActiveRecord::Migration
  def change
    add_column :anomalies, :subtypes, :string, array: true, default: []
  end
end

From the console I can pass an array in no problem.
I am wondering how to make this work? 
UPDATE:
private
  def anomaly_params
    params.require(:anomaly).permit(:test1, :test2, :name, :description, :subtypes)
  end

A:

Your text_field_tags need to be nested under the object
<%= text_field_tag("anomaly[test1]") %>
<%= text_field_tag("anomaly[test2]") %>

That's because the form_for you're using sets all the other fields under anomaly.  anomaly_params only grabs what's underneath anomaly in your update method.
UPDATE
Since you're using an Array in your DB field and you've chosen to use more than one field for the Array you need to capture it in both the create and update controller method.  With the same text_field_tags I've written here you would do:
def create
  
  create_subtypes
  
  if @anmaly.save(anomaly_params)
  ...

def update

  create_subtypes

  if @anomaly.update(anomaly_params)
  ...

private
def create_subtypes
  params['anomaly']['subtypes'] = Array(params['anomaly']['subtypes']) << params['anomaly'].delete('test1')
  params['anomaly']['subtypes'] = Array(params['anomaly']['subtypes']) << params['anomaly'].delete('test2')
end

To address the empty item at the beginning of the Array do as follows:
def create_subtypes
  params['anomaly']['subtypes'] = Array(params['anomaly']['subtypes'].presence).compact << params['anomaly'].delete('test1')
  params['anomaly']['subtypes'] = Array(params['anomaly']['subtypes'].presence).compact << params['anomaly'].delete('test2')
end

It might be easier to just create a regular :subtypes form field and let the user manually enter in their own comma separated list instead of using test1 and test2.

