A number of commentators seem to consider the possibility that Luke deduces parallels between the two events. Among those who see some link are Bruce (NICNT), Longnecker (EBC), Polhill (NAC), and Witherington (SRC). F.F. Bruce writes:
The story of Ananias is to the book of Acts what the story of Achan is to the book of Joshua. In both narratives an act of deceit interrupts the victorious progress of the people of God. It may be that the author of Acts himself which to point this comparison: when he says that Ananias "kept back" part of the price (v. 2), he uses the same Greek word as is used in the Greek version of Josh. 7:1 where it is said that the Israelites (represented by Achan) "broken faith" by retaining for private use property that had been devotd to God.
Bruce, F.F. (1988). The Book of Acts, NICNT (p. 102). Grand Rapids, MI: Eerdmans Publishing Company.
Darrell Bock argues against this:
The differences between Joshua and this text show that this OT text cannot be the basis for the event here. This event is not an “exact parallel” of Josh. 7, as four differences show (pace Haenchen 1987: 239–41): (1) Joshua has no miracle. (2) Here a lie is told to Peter, not a disclosure as with Achan. (3) The community does not suffer any loss. (4) There is no stoning; God acts directly. This kind of instant judgment is unique in the NT, although it is suggested in a text like 1 Cor. 11:30 about how some have died for taking the Lord’s Supper inappropriately.
Bock, D. L. (2007). Acts, BECNT (p. 220). Grand Rapids, MI: Baker Academic.
It's not clear to me whether Bock sees no link, or whether he's only denying that Luke invented the story with the Joshua narrative as its basis. If Luke is only himself detecting parallels between two historical events and shaping his story to better reflect that, Bock's criteria are overly stringent. The differences in Luke's account could easily be accounted for on the basis that Luke didn't feel at liberty to manipulate the basic facts of the event in order to conform to what he perceived as a parallel story.
Program and Purpose
I don't see this as part of a larger program that Luke develops in Acts, though I'd be open to seeing evidence otherwise. That said, at least one of the functions of the parallel would seem to be to highlight a parallel between the conquest in Joshua and the spread of the gospel in Acts. In Joshua, the conquest was impeded by Achan's sin. Perhaps Luke wants to demonstrate likewise how covetousness impedes the spread of the gospel to the ends of the earth.
Additionally, any connection to the Joshua narrative could be functioning to demonstrate continuity between the Hebrew scriptures and what was unfolding in the early church. As Witherington states, "Luke's view is that the God of the Hebrew Scriptures is the same God Jesus and the disciples served, and so one should expect continuity of character and action."