Added support for writing using indexers.

Signed-off-by: Dimitar Dobrev <dpldobrev@yahoo.com>