GET array for use with IN clause of custom query action

From the stackoverflow posted by @George I read that arrays are not supported by PDO and you have to rewrite the query and have a parameter for each value in the array. In the query builder the query is build dynamically and it creates multiple parameters for each value in the array for the IN statement.