There is also an answer at Apply row transformation for multiple input columns in Script Transformation with typeof(Input0Buffer).GetProperties() instead of GetType().GetProperties() as you find it here in the other answer, and even if that should be the same, the answer there goes slightly further and embeds a new Dictionary of the column names and their indexes in the Input0ByIndexBuffer, replacing Input0Buffer:
you actually can access the underlying object in a script and iterate over a buffer, without using the named columns. You need to inherit the buffer and use this inherited class in public override void ProcessInput(int InputID, string InputName, PipelineBuffer Buffer, OutputNameMap OutputMap). I usually use a class inherited from Input0Buffer ( the autogenrated one) so I can access both the named and the iterateable columns.You can get the indexes to the columns by using Reflection e.g.:
//inherit via BufferWrapper
public class Input0ByIndexBuffer : Input0Buffer
And then, it seems to have worked to loop over all columns of the Row object, by changing from:
public override void Input0_ProcessInputRow(Input0Buffer Row)
to the self-written:
public void Input0_ProcessInputRow(Input0ByIndexBuffer Row)
This self-written Input0ByIndexBuffer allows you to get all the columns in one go or other attributes that were protected before this change. It seems like a large code, but it is just a copy of the Input0Buffer class with the needed small changes so that the needed attributes are no longer protected, and don't be afraid of large code since you can hide it in #region Input0ByIndexBuffer:

Small test, after copying everything to my code, you have the Dictionary ColumnIndexes with all column names and their indices to loop over which was not there before. This Dictionary is also what seems to be the main trick to get the loop done, as the answerer writes:
The actual indexes to the column names I'll get from the Dictionary ColumnIndexes:

Works:

The next Debug line will then show the first column of the Row object.
The Dictionary is made in the following lines right at the top of the long code:
public Dictionary<string, int> ColumnIndexes = new Dictionary<string, int>();
public Input0ByIndexBuffer(PipelineBuffer Buffer, int[] BufferColumnIndexes, OutputNameMap OutputMap) : base(Buffer, BufferColumnIndexes, OutputMap)
{
IList<string> propertyList = new List<string>();
foreach (PropertyInfo property in typeof(Input0Buffer).GetProperties())
if (!property.Name.EndsWith("_IsNull"))
propertyList.Add(property.Name.ToUpperInvariant());
for (int i = 0; i < propertyList.Count; i++)
ColumnIndexes[propertyList[i]] = i;
}
The answerer has embedded this in the new Input0ByIndexBuffer class. To get this class to work, you need the Reflection namespace: you need using System.Reflection;, as the answerer writes. On the whole, my namespaces to get my own code to run (with the last three needed after the code change) are:
#region Namespaces
using System;
using System.Data;
using System.Data.SqlClient;
using Microsoft.SqlServer.Dts.Pipeline.Wrapper;
using Microsoft.SqlServer.Dts.Runtime.Wrapper;
using System.Reflection;
using Microsoft.SqlServer.Dts.Pipeline;
using System.Collections.Generic;
#endregion
The propertyList gets all of the columns from typeof(Input0Buffer).GetProperties(). And the ColumnIndexes[propertyList[i]] then maps the indexes to the column names in that propertyList. In the end, you have everything you need in the Dictionary ColumnIndexes: the column name and its index.