The idea is that a turtle can't do this. However, with OpenPeripherals installed, you can rig up an external container as a peripheral and order the
container itself to place the item into the turtle.
local container = peripheral.wrap(<side>)
container.pushItemIntoSlot(<direction>, <fromContainerSlot>, <amount>, <toTurtleSlot>)
So let's say the turtle is to the south of the container. You want to transfer at most 20 items from the container's third slot to the turtle's tenth slot. You'd do:
local container = peripheral.wrap(<side>)
container.pushItemIntoSlot("south", 3, 20, 10)