Added generic Partition method

..and updated the array-based Partition ones.