Table doesn't have a primary key. Exception for local lookup table
When I create a lookup table as a local object in an automation the AddRow functionality fails with a "Table doesn't have a primary key." exception, however simply making the lookup table global (no other changes to the table) solves the problem.
The table does have it's first column set as Key = True
There is no best practice here. I think the best way is determined by the number of parameters and the use case. Local variables provide thread safety for your automation. If an automation could be executed more than once concurrently (triggered by an event for instance) then you will want to pass in the values. If this is not possible and there are a small number of values to pass in, using parameters makes sense. If you have a large number of values and the automation is not going to be executed concurrently then using a table is a convenient way to avoid unnecessary copying of the data.
In your projects we used this practice due to the volume of data required - not due to a best practice constraint.