Functions with variable number of input pins

The way to do it in Blueprint is to take an array-of-type, rather than the actual type. Then the caller can pass in an array of whatever size he/she wants. This is a work-around, not exactly what you want.

The way to do it “for real” is to write C++. Grepping for “Add pin” in the GitHub source finds a good example:

Engine/Source/Editor/GraphEditor/Private/KismetNodes/SGraphNodeSwitchStatement.cpp

which uses an API documented in a header file:

Engine/Source/Editor/GraphEditor/Public/SGraphNode.h

The interesting functions are Create{Input,Output}SideAddButton(), IsAddPiButtonVisible(), and OnAddPin().